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

8.2 Axis settings (MGL)

These large set of commands control how the axis and ticks will be drawn. Note that there is 3-step transformation of data coordinates are performed. Firstly, coordinates are projected and cutting is applied (see section Cutting (MGL)), after it transformation formulas are applied, and finally the data was normalized in bounding box.

MGL command: axis x1 y1 x2 y2
MGL command: axis x1 y1 z1 x2 y2 z2

MGL command: ranges x1 x2 y1 y2 [z1=0 z2=0]

Sets the ranges of coordinates changing. Also it sets the range for coloring (analogous to caxis z1 z2). Initial ranges are [-1, 1].

MGL command: axis 'fx' 'fy' ['fz'='' 'fa'='']

Sets the transformation formulas for curvilinear coordinates. Each string should contain mathematical expression for real coordinate depending on internal coordinates ‘x’, ‘y’, ‘z’ and ‘a’ or ‘c’ for colorbar. For example, the cylindrical coordinates are introduced as axis 'x*cos(y)' 'x*sin(y)' 'z'. For removing of formulas the corresponding parameter should be ''. The using of transformation formulas will slightly slowing the program, i.e. axis '' '' '' is faster than axis '1*x' '1*y' '1*z'. Initially all formulas are absent (Cartesian coordinates are used). For more details about functions and formulas, see section Textual formulas.

MGL command: axis how

Sets one of the predefined transformation formulas for curvilinear coordinate. Paramater how define the coordinates: ‘0’ – Cartesian coordinates (no transformation); ‘1’ – Polar coordiantes x_n=x*cos(y),y_n=x*sin(y), z_n=z; ‘2’ – Spherical coordinates x_n=x*sin(y)*cos(z), y_n=x*sin(y)*sin(z), z_n=x*cos(y); ‘3’ – Parabolic coordinates x_n=x*y, y_n=(x*x-y*y)/2, z_n=z; ‘4’ – Paraboloidal coordinates x_n=(x*x-y*y)*cos(z)/2, y_n=(x*x-y*y)*sin(z)/2, z_n=x*y; ‘5’ – Oblate coordinates x_n=cosh(x)*cos(y)*cos(z), y_n=cosh(x)*cos(y)*sin(z), z_n=sinh(x)*sin(y); ‘6’ – Prolate coordinates x_n=sinh(x)*sin(y)*cos(z), y_n=sinh(x)*sin(y)*sin(z), z_n=cosh(x)*cos(y); ‘7’ – Elliptic coordinates x_n=cosh(x)*cos(y), y_n=sinh(x)*sin(y), z_n=z; ‘8’ – Toroidal coordinates x_n=sinh(x)*cos(z)/(cosh(x)-cos(y)), y_n=sinh(x)*sin(z)/(cosh(x)-cos(y)), z_n=sin(y)/(cosh(x)-cos(y)); ‘9’ – Bispherical coordinates x_n=sin(y)*cos(z)/(cosh(x)-cos(y)), y_n=sin(y)*sin(z)/(cosh(x)-cos(y)), z_n=sinh(x)/(cosh(x)-cos(y)); ‘10’ – Bipolar coordinates x_n=sinh(x)/(cosh(x)-cos(y)), y_n=sin(y)/(cosh(x)-cos(y)), z_n=z.

MGL command: caxis z1 z2

Sets the range for surface coloring. Initial range is [-1, 1].

MGL command: origin x0 y0 [z0=nan]

Center of axis cross section. If one of values is nan then MathGL library try to select optimal axis position.

MGL command: ternary val

The command sets to draws Ternary plot. This special plot is for 3 dependent coordinates (components) a, b, c so that a+b+c=1. MathGL uses only 2 independent coordinates a=x and b=y since it is enough to plot everything. At this third coordinate z act as another parameter to produce contour lines, surfaces and so on. See section Ternary plot sample, for sample code and picture.

MGL command: xrange dat [add=off fact=0]

MGL command: yrange dat [add=off fact=0]

MGL command: zrange dat [add=off fact=0]

MGL command: crange dat [add=off fact=0]

Sets the range for x-,y-,z- coordinate or coloring as minimal and maximal values of data dat. Parameter add=on shows that the new range will be joined to existed one (nut will not replace it). Parameter fact add additional range increase on value (Max-Min)*fact.

MGL command: xrange x1 x2
MGL command: yrange x1 x2
MGL command: zrange x1 x2
MGL command: crange x1 x2

Sets the range for x-,y-,z- coordinate or coloring. See also axis.

MGL command: xtick val [sub=0 org=nan]

MGL command: ytick val [sub=0 org=nan]

MGL command: ztick val [sub=0 org=nan]

MGL command: ctick val

Sets step for x-, y-, z-axis ticks or colorbar ticks (if val>0) or it’s number (if val<0) in corresponding direction. Zero value val=0 sets logarithmic ticks. Parameter sub sets the number of sub-ticks. Parameter org set the starting points for ticks. If not org=nan then the value from origin is used.

MGL command: xtick 'templ'
MGL command: ytick 'templ'
MGL command: ztick 'templ'
MGL command: ctick 'templ'

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

MGL command: xtick val1 'lbl1' [val2 'lbl2' ...]
MGL command: ytick val1 'lbl1' [val2 'lbl2' ...]
MGL command: ztick val1 'lbl1' [val2 'lbl2' ...]

Sets manual positions val1,val2,... and labels lbl1,lbl2,... for ticks along x-, y-, z-axis. Labels may contain TeX symbols also.

MGL command: adjust ['dir'='xyzc']

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.


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