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

8.9 Axis and Colorbar (Pure C)

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 (Pure C).

C function: void mgl_axis (HMGL gr, const char *dir)

Draws axes with ticks (see section Axis settings (Pure C)) 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 mgl_set_font_def() (see section Font settings).

C function: void mgl_colorbar (HMGL gr, const char *sch, int where)

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

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 an Axis(). The style of lines is determined by pen parameter.

C function: void mgl_box (HMGL gr, int ticks)
C function: void mgl_box_rgb (HMGL gr, float r, float g, float b, int ticks)
C function: void mgl_box_str (HMGL gr, const char *col, int ticks)

Draws bounding box outside the plotting volume with color specified by string col or by RGB values.

C function: void mgl_label (HMGL gr, char dir, const char *text)
C function: void mgl_label_ext (char dir, const char *text, int pos, float size, float shift)

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 (default). 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 Text printing (Pure C).


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