## GogAxisMap

GogAxisMap

## Functions

double | gog_axis_map ()
double | gog_axis_map_derivative_to_view ()
gboolean | gog_axis_map_finite ()
void | gog_axis_map_free ()
double | gog_axis_map_from_view ()
double | gog_axis_map_get_baseline ()
void | gog_axis_map_get_bounds ()
void | gog_axis_map_get_extents ()
void | gog_axis_map_get_real_bounds ()
void | gog_axis_map_get_real_extents ()
gboolean | gog_axis_map_is_discrete ()
gboolean | gog_axis_map_is_inverted ()
gboolean | gog_axis_map_is_valid ()
GogAxisMap * | gog_axis_map_new ()
double | gog_axis_map_to_view ()

## Types and Values

| GogAxisMap

## Object Hierarchy

        GBoxed
        ╰── GogAxisMap

## Description

## Functions

### gog_axis_map ()

    double
    gog_axis_map (GogAxisMap *map,
                  double value);

Converts `value` to plot coordinates. A value in [0,1.0] range means a data within axis bounds.

#### Parameters

map | a GogAxisMap |
value | value to map to plot space. |

#### Returns

mapped value.

### gog_axis_map_derivative_to_view ()

    double
    gog_axis_map_derivative_to_view (GogAxisMap *map,
                                     double value);

#### Parameters

map | a GogAxisMap |
value | value to map to canvas space |

#### Returns

the derivative of the mapping expression at value.

### gog_axis_map_finite ()

    gboolean
    gog_axis_map_finite (GogAxisMap *map,
                         double value);

Tests whether `value` is valid for the given `map` .

#### Parameters

map | a GogAxisMap |
value | value to test |

#### Returns

`TRUE` if value means something

### gog_axis_map_free ()

    void
    gog_axis_map_free (GogAxisMap *map);

Frees GogAxisMap object.

#### Parameters

map | a GogAxisMap |

### gog_axis_map_from_view ()

    double
    gog_axis_map_from_view (GogAxisMap *map,
                            double value);

Converts value from canvas space to data space.

#### Parameters

map | a GogAxisMap |
value | value to unmap from canvas space. |

#### Returns

value in data coordinates

### gog_axis_map_get_baseline ()

    double
    gog_axis_map_get_baseline (GogAxisMap *map);

#### Parameters

map | a GogAxisMap |

#### Returns

the baseline for `map` , in view coordinates, clipped to offset and offset+length, where offset and length are the parameters of gog_axis_map_new.

### gog_axis_map_get_bounds ()

    void
    gog_axis_map_get_bounds (GogAxisMap *map,
                             double *minimum,
                             double *maximum);

Gets bounds for the whole chart relative to the given axis map in data coordinates. If axis is invalid, it'll return arbitrary bounds.

Any of `minimum` and `maximum` may be NULL.

#### Parameters

map | a GogAxisMap |
minimum | location to store minimum for this axis |
maximum | location to store maximum for this axis |

### gog_axis_map_get_extents ()

    void
    gog_axis_map_get_extents (GogAxisMap *map,
                              double *start,
                              double *stop);

Gets start and stop for the whole chart relative to the given axis map in data coordinates. If axis is not inverted, start = minimum and stop = maximum. If axis is invalid, it'll return arbitrary bounds.

Any of `start` and `stop` may be NULL.

#### Parameters

map | a GogAxisMap |
start | location to store start for this axis |
stop | location to store stop for this axis |

### gog_axis_map_get_real_bounds ()

    void
    gog_axis_map_get_real_bounds (GogAxisMap *map,
                                  double *minimum,
                                  double *maximum);

Gets bounds for the given axis map in data coordinates. If axis is invalid, it'll return arbitrary bounds.

Any of `minimum` and `maximum` may be NULL.

#### Parameters

map | a GogAxisMap |
minimum | location to store minimum for this axis |
maximum | location to store maximum for this axis |

### gog_axis_map_get_real_extents ()

    void
    gog_axis_map_get_real_extents (GogAxisMap *map,
                                   double *start,
                                   double *stop);

Gets start and stop for the given axis map in data coordinates. If axis is not inverted, start = minimum and stop = maximum. If axis is invalid, it'll return arbitrary bounds.

Any of `start` and `stop` may be NULL.

#### Parameters

map | a GogAxisMap |
start | location to store start for this axis |
stop | location to store stop for this axis |

### gog_axis_map_is_discrete ()

    gboolean
    gog_axis_map_is_discrete (GogAxisMap *map);

#### Parameters

map | a GogAxisMap |

#### Returns

`TRUE` is the axis is discrete;

### gog_axis_map_is_inverted ()

    gboolean
    gog_axis_map_is_inverted (GogAxisMap *map);

#### Parameters

map | a GogAxisMap |

#### Returns

`TRUE` is the axis is inverted;

### gog_axis_map_is_valid ()

    gboolean
    gog_axis_map_is_valid (GogAxisMap *map);

Tests if `map` was correctly initialized, i.e. if bounds are valid.

#### Parameters

map | a GogAxisMap |

#### Returns

`TRUE` if map is valid

### gog_axis_map_new ()

    GogAxisMap *
    gog_axis_map_new (GogAxis *axis,
                      double offset,
                      double length);

Creates a GogAxisMap for data mapping to plot window. offset and length are optional parameters to be used with gog_axis_map_to_view in order to translates data coordinates into canvas space.

#### Parameters

axis | a GogAxis |
offset | start of plot area. |
length | length of plot area. |

#### Returns

a newly allocated GogAxisMap.

[transfer full]

### gog_axis_map_to_view ()

    double
    gog_axis_map_to_view (GogAxisMap *map,
                          double value);

Converts value from data space to canvas space, using offset and length parameters given to gog_axis_map_new.

#### Parameters

map | a GogAxisMap |
value | value to map to canvas space |

#### Returns

a value in canvas coordinates

## Types and Values

### GogAxisMap

    typedef struct _GogAxisMap GogAxisMap;