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

3.2.3 Ticks

Method on mglGraph (C++, Python): void AdjustTicks (const char *dir="xyz")
C function: void mgl_adjust_ticks (HMGL gr, const char *dir)

Set the ticks step, number of sub-ticks and initial ticks position to be the most human readable for the axis along direction(s) dir. Also set SetTuneTicks(true).

Method on mglGraph (C++, Python): void SetTicks (char dir, float d=-5, int ns=0, float org=NAN)
C function: void mgl_set_ticks_dir (HMGL gr, char dir, float d, int ns, float org)
C function: void mgl_set_ticks (HMGL gr, float dx, float dy, float dz)
C function: void mgl_set_subticks (HMGL gr, int nx, int ny, int nz)
C function: void mgl_set_tick_origin (HMGL gr, float x0, float y0, float z0)

Set the ticks step d, number of sub-ticks ns and initial ticks position org for the axis along direction dir (use ’c’ for colorbar ticks). 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.

Method on mglGraph (C++, Python): void SetTicksVal (char dir, int n, float *val, const char **lbl)
Method on mglGraph (C++, Python): void SetTicksVal (char dir, int n, float *val, const wchar_t **lbl)
Method on mglGraph (C++): void SetTicksVal (char dir, int n, float val1, wchar_t *lbl1, ...)
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 must contain n elements. Use SetTicks() to restore automatic ticks. 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.

Method on mglGraph (C++, Python): void SetTuneTicks (bool tune, float pos=1.15)
C function: void mgl_tune_ticks (HMGL gr, bool tune, float 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 pos of common multiplier/component on the axis: =0 at minimal axis value, =1 at maximal axis value. Default value is 1.15.

Method on mglGraph (C++, Python): void SetXTT (const char *xtt)
Method on mglGraph (C++, Python): void SetYTT (const char *ytt)
Method on mglGraph (C++, Python): void SetZTT (const char *ztt)
Method on mglGraph (C++, Python): void SetCTT (const char *ctt)
Method on mglGraph (C++, Python): void SetXTT (const wchar_t *xtt)
Method on mglGraph (C++, Python): void SetYTT (const wchar_t *ytt)
Method on mglGraph (C++, Python): void SetZTT (const wchar_t *ztt)
Method on mglGraph (C++, Python): void SetCTT (const wchar_t *ctt)
C function: void mgl_set_xttw (HMGL gr, const wchar_t *xtt)
C function: void mgl_set_yttw (HMGL gr, const wchar_t *ytt)
C function: void mgl_set_zttw (HMGL gr, const wchar_t *ztt)
C function: void mgl_set_cttw (HMGL gr, const wchar_t *ctt)
C function: void mgl_set_xtt (HMGL gr, const wchar_t *xtt)
C function: void mgl_set_ytt (HMGL gr, const wchar_t *ytt)
C function: void mgl_set_ztt (HMGL gr, const wchar_t *ztt)
C function: void mgl_set_ctt (HMGL gr, const wchar_t *ctt)

The template for x-,y-,z-axis ticks or colorbar ticks. It may contain TeX symbols also. If xtt, ytt, ztt, ctt="" then default template is used (in simplest case it is ‘%.2g’). Setting of template switch off automatic ticks tuning (see SetTuneTicks()).

Obsolete option of mglGraph: float dx, dy, dz

Step for axis ticks. See SetTicks().

Obsolete option of mglGraph: int NSx, NSy, NSz

Number of axis sub-ticks. See SetTicks().

Obsolete option of mglGraph: mglPoint OrgT

Starting point for ticks. See SetTicks().

Obsolete option of mglGraph: bool TuneTicks

Switch on/off ticks enhancing by factoring common multiplier. See SetTuneTicks().

Obsolete option of mglGraph: float FactorPos

The position of common multiplier/component on the axis. See SetTuneTicks().


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