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

1.4.1 Coordinate axes

Two axis representations are used in MathGL. The first one consists of normalizing the data point coordinates in a box MinxMax (see section Axis settings). If Cut is true then the outlier points are omitted, otherwise they are projected to the bounding box (see section Cutting). Also, the point will be omitted if it lies inside the box defined by CutMin x CutMax or if the value of formula CutOff() is nonzero for its coordinates. After that, transformation formulas are applied to the data point. Finally, the data point is plotted by one of the functions.

There is a possibility to set members Max, Min directly, but one should call RecalcBorder() function to setup plotting routines. A safer way is to set these values by calling the Axis() function, which calls RecalcBorder() automatically. Another way to specify the scaling of the axis is to set it as a minimal or maximal value of the data array. Functions XRange(), YRange(), ZRange() do it. The second (optional) argument is used to replace the axis range or to join with the existed range.

The axis origin is defined by the variable Org and is applied to all consequent calls of axes or grid drawing. By default, if this point lies outside the bounding box then it is projected onto the one (variable AutoOrg controls it). If one of the values of Org is equal to NAN then the corresponding value will be selected automatically.

There is 4-th axis c (color axis or colorbar) in addition to the usual axes x, y, z. It sets the range of values for the surface coloring. Its borders are automatically set to values of Min.z, Max.z during the call of Axis() function. Also, one can directly change the color range by setting variables Cmax, Cmax, or calling functions CAxis() or CRange(). Use Colorbar() function for showing the colorbar.

The form (appearence) of tick labels is controlled by SetTicks() function (see section Axis settings). It has 3 arguments: first one d sets the tick step (if positive) or tick number (if negative) or switches logarithmic ticks on (if zero); the second one, ns, sets the number of subticks; the last one is the starting point for ticks (default is axis origin). Function SetTuneTicks switches on/off tick enhancing by factoring out acommon multiplier (for small coordinate values, like 0.001 to 0.002, or large, like from 1000 to 2000) or common component (for narrow range, like from 0.999 to 1.000). Finally, you may use functions SetXTT(), SetYTT(), SetZTT(), SetCTT() for setting templates for tick labels (it supports TeX symbols). Also, there is a possibility to print arbitrary text as tick labels the by help of SetTicksVal() function.


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