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

4.8 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 Axis settings.

MGL command: axis ['dir'='xyz' 'stl'='']
Method on mglGraph: void Axis (const char *dir="xyz", const char *stl="")
C function: void mgl_axis (HMGL gr, const char *dir, const char *stl)

Draws axes with ticks (see Axis settings). Parameter dir may contain:

  • xyz’ for drawing axis in corresponding direction;
  • _’ for disabling tick labels;
  • AKDTVISO’ for drawing arrow at the end of axis;
  • a’ for forced adjusting of axis ticks.

Styles of ticks and axis can be overrided by using stl string. See section Axis and ticks, for sample code and picture.

MGL command: colorbar ['sch'='']
Method on mglGraph: void Colorbar (const char *sch="")
C function: void mgl_colorbar (HMGL gr, const char *sch)

Draws colorbar. Parameter sch may contain:

  • color scheme (see Color scheme);
  • <>^_’ for positioning at left, at right, at top or at bottom correspondingly;
  • I’ for positioning near bounding (by default, is positioned at edges of subplot);
  • A’ for using absolute coordinates.

See section Colorbars, for sample code and picture.

MGL command: colorbar vdat ['sch'='']
Method on mglGraph: void Colorbar (const mglData &v, const char *sch="")
C function: void mgl_colorbar_val (HMGL gr, HCDT v, const char *sch)

The same as previous but with sharp colors sch (current palette if sch="") for values v. See section ContD sample, for sample code and picture.

MGL command: colorbar 'sch' x y [w=1 h=1]
Method on mglGraph: void Colorbar (const char *sch, float x, float y, float w=1, float h=1)
C function: void mgl_colorbar_ext (HMGL gr, const char *sch, float x, float y, float w, float h)

The same as first one but at arbitrary position of subplot {x, y} (supposed to be in range [0,1]). Parameters w, h set the relative width and height of the colorbar.

MGL command: colorbar vdat 'sch' x y [w=1 h=1]
Method on mglGraph: void Colorbar (const mglData &v, const char *sch, float x, float y, float w=1, float h=1)
C function: void mgl_colorbar_val_ext (HMGL gr, HCDT v, const char *sch, float x, float y, float w, float h)

The same as previous but with sharp colors sch (current palette if sch="") for values v. See section ContD sample, for sample code and picture.

MGL command: grid ['dir'='xyz' 'pen'='B']
Method on mglGraph: void Grid (const char *dir="xyz", const char *pen="B")
C function: void mgl_axis_grid (HMGL gr, const char *dir, const char *pen)

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

MGL command: box ['stl'='k' ticks=on]
Method on mglGraph: void Box (const char *col="", bool ticks=true)
C function: void mgl_box (HMGL gr, int ticks)
C function: void mgl_box_str (HMGL gr, const char *col, int ticks)

Draws bounding box outside the plotting volume with color col. If col contain ‘@’ then filled faces are drawn. At this first color is used for faces (default is light yellow), last one for edges. See section Bounding box, for sample code and picture.

MGL command: xlabel 'text' [pos=1 shift=0]
MGL command: ylabel 'text' [pos=1 shift=0]
MGL command: zlabel 'text' [pos=1 shift=0]
MGL command: tlabel 'text' [pos=1 shift=0]
Method on mglGraph: void Label (char dir, const char *text, float pos=1, float shift=0)
Method on mglGraph: void Label (char dir, const wchar_t *text, float pos=1, float shift=0)
C function: void mgl_label (HMGL gr, char dir, const char *text)
C function: void mgl_label_ext (HMGL gr, char dir, const char *text, float pos, float shift)
C function: void mgl_labelw_ext (HMGL gr, char dir, const wchar_t *text, float pos, float shift)

Prints the label text for axis dir=‘x’,‘y’,‘z’,‘t’ (here ‘t’ is “ternary” axis t=1-x-y). 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. See section Text printing.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on April 13, 2012 using texi2html 5.0.

© manpagez.com 2000-2025
Individual documents may contain additional copyright information.