manpagez: man pages & more
info mathgl
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.4.3 Ticks (Pure C)

C function: void mgl_set_ticks_dir (HMGL gr, char dir, float d, int ns, float org)

Set the ticks step d, number of sub-ticks ns and initial ticks position org for the axis along direction dir. Variable d set step for axis ticks (if positive) or it's number on the axis range (if negative). Zero value set logarithmic ticks. If org value is NAN then value from Org is used.

C function: void mgl_set_ticks_vals (HMGL gr, char dir, int n, float *val, const char **lbl)
C function: void mgl_set_ticks_val (HMGL gr, char dir, int n, double val, const char *lbl, ...)

Set the manual positions val and its labels lbl for n-th ticks along axis dir. The arrays val and lbl have to contain n elements. Use mgl_set_ticks_dir() to restore automatic ticks. Note, these functions are not available in Fortran interface. Note, you have to be very careful to use floating-point (not integer!!!) values as ticks position due to limitations of stdarg library (argument transfer). See section Tick values sample, for sample code and picture.

C function: void mgl_set_ticks (HMGL gr, float dx, float dy, float dz)

Step for axis ticks (if positive) or it's number (if negative) in x-,y-,z- directions. Zero value set logarithmic ticks. This function are obsolete – use mgl_set_ticks_dir() function instead.

C function: void mgl_set_subticks (HMGL gr, int nx, int ny, int nz)

Number of axis subticks in x-,y-,z- directions. This function are obsolete – use mgl_set_ticks_dir() function instead.

C function: void mgl_set_tick_origin (HMGL gr, float x0, float y0, float z0)

Starting point for ticks. If corresponding value is NAN then value from Org is used (it is default). This function are obsolete – use mgl_set_ticks_dir() function instead.

C function: void mgl_set_xtt (HMGL gr, const wchar_t *templ)
C function: void mgl_set_ytt (HMGL gr, const wchar_t *templ)
C function: void mgl_set_ztt (HMGL gr, const wchar_t *templ)
C function: void mgl_set_ctt (HMGL gr, const wchar_t *templ)

The template for x-,y-,z-axis ticks or colorbar ticks. It may contain TeX symbols also. If templ=NULL then default template is used (in simplest case it is ‘%.2g’) with automatic detaching of common multiplier or common component (see TuneTicks).

C function: void mgl_tune_ticks (HMGL gr, int tune, float fact_pos)

Switch on/off ticks enhancing by factoring common multiplier (for small, like from 0.001 to 0.002, or large, like from 1000 to 2000, coordinate values) or common component (for narrow range, like from 0.999 to 1.000). Also set the position of common multiplier/component on the axis: =0 at minimal axis value, =1 at maximal axis value. Default value is 1.15.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]
© manpagez.com 2000-2026
Individual documents may contain additional copyright information.