Top | ![]() |
![]() |
![]() |
![]() |
GtkWidget * | gwy_axis_new () |
void | gwy_axis_set_logarithmic () |
void | gwy_axis_set_visible () |
gboolean | gwy_axis_is_visible () |
gboolean | gwy_axis_is_logarithmic () |
GtkPositionType | gwy_axis_get_orientation () |
void | gwy_axis_set_auto () |
void | gwy_axis_request_range () |
void | gwy_axis_get_range () |
void | gwy_axis_get_requested_range () |
gdouble | gwy_axis_get_magnification () |
const gchar * | gwy_axis_get_magnification_string () |
void | gwy_axis_set_label () |
const gchar * | gwy_axis_get_label () |
void | gwy_axis_set_si_unit () |
void | gwy_axis_enable_label_edit () |
void | gwy_axis_draw_on_drawable () |
GString * | gwy_axis_export_vector () |
const gdouble * | gwy_axis_get_major_ticks () |
gboolean | auto | Read / Write |
gchar * | label | Read / Write |
gint | line-thickness | Read / Write |
gint | major-length | Read / Write |
gint | major-maxticks | Read / Write |
gint | major-thickness | Read / Write |
gint | minor-division | Read / Write |
gint | minor-length | Read / Write |
gint | minor-thickness | Read / Write |
gint | outer-border-width | Read / Write |
GwyAxis is used for drawing axis. It is namely used within GwyGraph widget, but it can be also used standalone. It plots a horizontal or vertical axis with major and minor ticks, with ranges in the requested interval.
void gwy_axis_set_logarithmic (GwyAxis *axis
,gboolean is_logarithmic
);
Sets logarithmic mode.
void gwy_axis_set_visible (GwyAxis *axis
,gboolean is_visible
);
Sets the visibility of an axis.
gboolean
gwy_axis_is_visible (GwyAxis *axis
);
Determines whether axis is set to be visible.
Return: TRUE
if axis
is set to be visible.
gboolean
gwy_axis_is_logarithmic (GwyAxis *axis
);
Determines whether axis is set to be locarithmic.
GtkPositionType
gwy_axis_get_orientation (GwyAxis *axis
);
Gets the orientation of an axis.
void gwy_axis_set_auto (GwyAxis *axis
,gboolean is_auto
);
Enables or disables automatic axis adjustmet.
void gwy_axis_request_range (GwyAxis *axis
,gdouble min
,gdouble max
);
Sets the requisition of axis boundaries.
The axis will adjust the boundaries to satisfy requisition but still have
reasonable tick values and spacing. Use gwy_axis_get_range()
to obtain the
boundaries the axis actually decided to use.
void gwy_axis_get_range (GwyAxis *axis
,gdouble *min
,gdouble *max
);
Gets the actual boundaries of an axis.
void gwy_axis_get_requested_range (GwyAxis *axis
,gdouble *min
,gdouble *max
);
Gets the requested boundaries of an axis.
gdouble
gwy_axis_get_magnification (GwyAxis *axis
);
Gets the magnification value of a graph axis.
const gchar *
gwy_axis_get_magnification_string (GwyAxis *axis
);
Gets the magnification string of an axis.
void gwy_axis_set_label (GwyAxis *axis
,const gchar *label
);
Sets the label text of an axis.
void gwy_axis_set_si_unit (GwyAxis *axis
,GwySIUnit *unit
);
Sets the axis unit. This will be added automatically
to the label. unit
is duplicated.
void gwy_axis_enable_label_edit (GwyAxis *axis
,gboolean enable
);
Enables/disables user to change axis label by clicking on axis widget.
void gwy_axis_draw_on_drawable (GwyAxis *axis
,GdkDrawable *drawable
,GdkGC *gc
,gint xmin
,gint ymin
,gint width
,gint height
);
Draws the x and y-axis on a drawable
GString * gwy_axis_export_vector (GwyAxis *axis
,gint xmin
,gint ymin
,gint width
,gint height
,gint fontsize
);
Renders a graph axis in PostScript.
This is a helper functions for gwy_graph_export_postscript()
and probably
not useful anywhere else.
struct GwyAxisClass { GtkWidgetClass parent_class; void (*rescaled)(GwyAxis *axis); void (*reserved1)(void); void (*reserved2)(void); };
typedef struct { gint major_length; gint major_thickness; gint major_maxticks; GwyAxisScaleFormat major_printmode; gint minor_length; gint minor_thickness; gint minor_division; /*minor division*/ gint line_thickness; PangoFontDescription *major_font; PangoFontDescription *label_font; } GwyAxisParams;
“auto”
property“auto” gboolean
Autoscale ticks with changing content.
Flags: Read / Write
Default value: TRUE
“label”
property“label” gchar *
Axis label (without units).
Flags: Read / Write
Default value: ""
“line-thickness”
property“line-thickness” gint
Axis main line thickness.
Flags: Read / Write
Allowed values: [0,20]
Default value: 5
“major-length”
property“major-length” gint
Major ticks length.
Flags: Read / Write
Allowed values: [0,20]
Default value: 5
“major-maxticks”
property“major-maxticks” gint
Major ticks maximum number.
Flags: Read / Write
Allowed values: [0,50]
Default value: 5
“major-thickness”
property“major-thickness” gint
Major ticks thickness.
Flags: Read / Write
Allowed values: [0,20]
Default value: 5
“minor-division”
property“minor-division” gint
Minor ticks division.
Flags: Read / Write
Allowed values: [0,20]
Default value: 5
“minor-length”
property“minor-length” gint
Minor ticks length.
Flags: Read / Write
Allowed values: [0,20]
Default value: 5
“minor-thickness”
property“minor-thickness” gint
Minor ticks thickness.
Flags: Read / Write
Allowed values: [0,20]
Default value: 5
“outer-border-width”
property“outer-border-width” gint
The extra amount of space left on the outer side of an axis. This space is also retained when axis is set non-visible.
Flags: Read / Write
Allowed values: >= 0
Default value: 5