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

3.7 Axis and Colorbar

These functions draw the “things for measuring”, like axis with ticks, colorbar with ticks, grid along axis, bounding box and labels for axis. For more information see section Axis settings.

Method on mglGraph: void Axis (const char *dir="xyz")

Draws axes with ticks (see section Axis settings) in directions determined by string parameter dir.If string contain the symbol ‘_’ then tick labels are not printed. Font for ticks labels is determined by FontDef (see section Font settings).

Method on mglGraph: void Colorbar (const char *sch=NULL, int where=0)

Draws colorbar with color scheme sch (current scheme if sch=NULL) at edge of plot. Parameter where specifies the position of the colorbar: ‘0’ - at right (default), ‘1’ - at left, ‘2’ - at top, ‘3’ - at bottom. See section Dens sample, for sample code and picture.

Method on mglGraph: void Grid (const char *dir="xyz", const char *pen="B-")

Draws grid lines perpendicular to direction determined by string parameter dir. The step of grid lines is the same as tick step for an Axis(). The style of lines is determined by pen parameter (default value is dark blue solid line (‘B-’).

Method on mglGraph: void Box (mglColor col=NC, bool ticks=true)
Method on mglGraph: void Box (const char *col, bool ticks=true)

Draws bounding box outside the plotting volume with color col.

Method on mglGraph: void Label (char dir, const char *text, int pos=+1, float size=-1.4, float shift=0)
Method on mglGraph: void Label (char dir, const wchar_t *text, int pos=+1, float size=-1.4, float shift=0)

Prints the label text for axis dir. The position of label is determined by pos parameter. If pos=0 then label is printed at the center of axis. If pos>0 then label is printed at the maximum of axis. If pos<0 then label is printed at the minimum of axis. Parameter size determines the font size for the label. By default the font size is 1.4 times larger than the one for ticks FontSize (see section Font settings). See section Text printing.


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