|  |  |  | Goffice Reference Manual |  | 
|---|---|---|---|---|
enum GogAxisPolarUnit; enum GogAxisElemType; GogAxisTick; GogAxisMap; GogAxisMap* gog_axis_map_new (GogAxis *axis, double offset, double length); double gog_axis_map (GogAxisMap *map, double value); double gog_axis_map_to_view (GogAxisMap *map, double value); double gog_axis_map_from_view (GogAxisMap *map, double value); gboolean gog_axis_map_finite (GogAxisMap *map, double value); double gog_axis_map_get_baseline (GogAxisMap *map); void gog_axis_map_get_extents (GogAxisMap *map, double *start, double *stop); void gog_axis_map_get_bounds (GogAxisMap *map, double *minimum, double *maximum); void gog_axis_map_free (GogAxisMap *map); gboolean gog_axis_map_is_valid (GogAxisMap *map); gboolean gog_axis_map_is_inverted (GogAxisMap *map); #define GOG_AXIS_TYPE #define GOG_AXIS (o) #define IS_GOG_AXIS (o) GType gog_axis_get_type (void); GogAxisType gog_axis_get_atype (GogAxis const *axis); gboolean gog_axis_is_center_on_ticks (GogAxis const *axis); gboolean gog_axis_is_discrete (GogAxis const *axis); gboolean gog_axis_is_inverted (GogAxis const *axis); gboolean gog_axis_get_bounds (GogAxis const *axis, double *minima, double *maxima); void gog_axis_set_bounds (GogAxis *axis, double minimum, double maximum); void gog_axis_set_extents (GogAxis *axis, double start, double stop); GOFormat* gog_axis_get_format (GogAxis const *axis); gboolean gog_axis_set_format (GogAxis *axis, GOFormat *fmt); unsigned gog_axis_get_ticks (GogAxis *axis, GogAxisTick **ticks); GOData* gog_axis_get_labels (GogAxis const *axis, GogPlot **plot_that_labeled_axis); double gog_axis_get_entry (GogAxis const *axis, GogAxisElemType i, gboolean *user_defined); void gog_axis_add_contributor (GogAxis *axis, GogObject *contrib); void gog_axis_del_contributor (GogAxis *axis, GogObject *contrib); GSListconst * gog_axis_contributors (GogAxis *axis); void gog_axis_clear_contributors (GogAxis *axis); void gog_axis_bound_changed (GogAxis *axis, GogObject *contrib); GogGridLine* gog_axis_get_grid_line (GogAxis *axis, gboolean major); void gog_axis_set_polar_unit (GogAxis *axis, GogAxisPolarUnit unit); GogAxisPolarUnit gog_axis_get_polar_unit (GogAxis *axis); double gog_axis_get_polar_perimeter (GogAxis *axis); double gog_axis_get_circular_rotation (GogAxis *axis);
typedef enum {
	GOG_AXIS_POLAR_UNIT_DEGREES,
	GOG_AXIS_POLAR_UNIT_RADIANS,
	GOG_AXIS_POLAR_UNIT_GRADS,
	GOG_AXIS_POLAR_UNIT_MAX
} GogAxisPolarUnit;
typedef enum {
	GOG_AXIS_ELEM_MIN = 0,
	GOG_AXIS_ELEM_MAX,
	GOG_AXIS_ELEM_MAJOR_TICK,
	GOG_AXIS_ELEM_MINOR_TICK,
	GOG_AXIS_ELEM_CROSS_POINT,
	GOG_AXIS_ELEM_MAX_ENTRY
} GogAxisElemType;
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.
| 
 | a GogAxis | 
| 
 | start of plot area. | 
| 
 | length of plot area. | 
| Returns : | a newly allocated GogAxisMap. | 
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.
| 
 | a GogAxisMap | 
| 
 | value to map to plot space. | 
| Returns : | mapped value. | 
double gog_axis_map_to_view (GogAxisMap *map, double value);
| 
 | a GogAxisMap | 
| 
 | value to map to canvas space | 
| Returns : | the derivative of the mapping expression at value. | 
double gog_axis_map_from_view (GogAxisMap *map, double value);
Converts value from canvas space to data space.
| 
 | a GogAxisMap | 
| 
 | value to unmap from canvas space. | 
| Returns : | value in data coordinates | 
gboolean gog_axis_map_finite (GogAxisMap *map, double value);
Tests wether value is valid for the given map.
| 
 | a GogAxisMap | 
| 
 | value to test | 
| Returns : | TRUEif value means something | 
double gog_axis_map_get_baseline (GogAxisMap *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. | 
void gog_axis_map_get_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. For example, an non inverted invalid X axis will have start set to 0.0 and stop set to 1.0.
minimum or maximum can be NULL.
| 
 | a GogAxisMap | 
| 
 | start for this axis | 
| 
 | stop for this axis | 
void gog_axis_map_get_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. For example, for an invalid x axis, minimum = 0.0 and maximum = 1.0.
minimum or maximum can be NULL.
| 
 | a GogAxisMap | 
| 
 | minimum for this axis | 
| 
 | maximum for this axis | 
void gog_axis_map_free (GogAxisMap *map);
Frees GogAxisMap object.
| 
 | a GogAxisMap | 
gboolean gog_axis_map_is_valid (GogAxisMap *map);
Tests if map was correctly initialized, i.e. if bounds are
valid.
| 
 | a GogAxisMap | 
| Returns : | TRUEif map is valid | 
gboolean gog_axis_map_is_inverted (GogAxisMap *map);
| 
 | a GogAxisMap | 
| Returns : | TRUEis the axis is inverted; | 
gboolean gog_axis_is_center_on_ticks (GogAxis const *axis);
| 
 | GogAxis | 
| Returns : | TRUE if labels are centered on ticks when axisis discrete | 
gboolean gog_axis_is_discrete (GogAxis const *axis);
| 
 | GogAxis | 
| Returns : | TRUE if axisenumerates a set of discrete items, rather than a
	continuous value | 
gboolean gog_axis_is_inverted (GogAxis const *axis);
| 
 | GogAxis | 
| Returns : | TRUE if axisis inverted. | 
gboolean            gog_axis_get_bounds                 (GogAxis const *axis,
                                                         double *minima,
                                                         double *maxima);
| 
 | GogAxis | 
| 
 | non-NULL storage for result | 
| 
 | non-NULL storage for result | 
| Returns : | TRUEif the bounds stored inminimaandmaximaare sane | 
void                gog_axis_set_bounds                 (GogAxis *axis,
                                                         double minimum,
                                                         double maximum);
Sets axis bounds. If minimum or maximum are not finite values, corresponding bound remains unchanged.
| 
 | GogAxis | 
| 
 | axis low bound | 
| 
 | axis high bound | 
void                gog_axis_set_extents                (GogAxis *axis,
                                                         double start,
                                                         double stop);
Set axis exents. It's a convenience function that sets axis bounds taking into account invert flag.
| 
 | GogAxis | 
| 
 | axis start bound | 
| 
 | axis stop bound | 
GOFormat* gog_axis_get_format (GogAxis const *axis);
| 
 | GogAxis | 
| Returns : | the format assigned to axisbut does not add a reference. | 
gboolean            gog_axis_set_format                 (GogAxis *axis,
                                                         GOFormat *fmt);
Absorbs a reference to fmt, and accepts NULL.
| 
 | GogAxis | 
| 
 | GOFormat | 
| Returns : | TRUE if things changed | 
unsigned            gog_axis_get_ticks                  (GogAxis *axis,
                                                         GogAxisTick **ticks);
An accessor to axis->ticks.
| 
 | GogAxis | 
| 
 | an array of GogAxisTick | 
| Returns : | number of ticks | 
GOData*             gog_axis_get_labels                 (GogAxis const *axis,
                                                         GogPlot **plot_that_labeled_axis);
| 
 | a GogAxis | 
| 
 | a GogPlot | 
| Returns : | the possibly NULL GOData used as a label for this axis along with the plot that it was associated with | 
double              gog_axis_get_entry                  (GogAxis const *axis,
                                                         GogAxisElemType i,
                                                         gboolean *user_defined);
| 
 | GogAxis | 
| 
 | |
| 
 | an optionally NULL pointr to gboolean | 
| Returns : | the value of axis element iand setsuser_definedor
	NaN on error | 
void                gog_axis_add_contributor            (GogAxis *axis,
                                                         GogObject *contrib);
Register contrib as taking part in the negotiation of axis's bounds.
| 
 | GogAxis | 
| 
 | GogObject (can we relax this to use an interface ?) | 
void                gog_axis_del_contributor            (GogAxis *axis,
                                                         GogObject *contrib);
contrib no longer takes part in the negotiation of axis's bounds.
| 
 | GogAxis | 
| 
 | GogObject (can we relax this to use an interface ?) | 
void                gog_axis_bound_changed              (GogAxis *axis,
                                                         GogObject *contrib);
| 
 | GogAxis | 
| 
 | GogObject | 
GogGridLine*        gog_axis_get_grid_line              (GogAxis *axis,
                                                         gboolean major);
| 
 | |
| 
 | |
| Returns : | 
void                gog_axis_set_polar_unit             (GogAxis *axis,
                                                         GogAxisPolarUnit unit);
Sets unit of a circular axis. See GogAxisPolarUnit for valid values.
| 
 | a GogAxis | 
| 
 | GogAxisPolarUnit | 
GogAxisPolarUnit gog_axis_get_polar_unit (GogAxis *axis);
| 
 | a GogAxis | 
| Returns : | unit of axisif it's a circular axis of a polar
	axis set, -1 otherwise. | 
double gog_axis_get_polar_perimeter (GogAxis *axis);
| 
 | |
| Returns : |