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

3.2.3 Ticks

Method on mglGraph: void SetTicks (char dir, float d=-5, int ns=0, float org=NAN)

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.

Method on mglGraph: void SetTicksVal (char dir, int n, float *val, const char **lbl)
Method on mglGraph: void SetTicksVal (char dir, int n, float *val, const wchar_t **lbl)
Method on mglGraph: void SetTicksVal (char dir, float val1, wchar_t *lbl1, ...)

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.

General option of mglGraph: float dx, dy, dz

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

General option of mglGraph: int NSx, NSy, NSz

Number of axis sub-ticks in x-,y-,z- directions. These variables are obsolete – use SetTicks() function instead.

General option of mglGraph: mglPoint OrgT

Starting point for ticks. If corresponding value is NAN then value from Org is used (it is default).

General option of mglGraph: const wchar_t *xtt, *ytt, *ztt, *ctt

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

General option of mglGraph: bool TuneTicks

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).

General option of mglGraph: float FactorPos

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.