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 (C++, Python): void Axis (const char *dir="xyz", bool adjust=false)
C function: void mgl_axis (HMGL gr, const char *dir)

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). Ticks will be adjusted if adjust=true (by call of AdjustTicks()). You may specified an arrow at the end of axis (see see section Line styles)

Method on mglGraph (C++, Python): void Colorbar (const char *sch="", int where=0)
C function: void mgl_colorbar (HMGL gr, const char *sch, int where)

Draws colorbar with color scheme sch (current scheme if sch="") 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. If string sch contains ‘<>^_’ then the parameter pos is defined as: pos=0 for ‘>’ (right), pos=1 for ‘<’ (left), pos=2 for ‘^’ (top), pos=3 for ‘_’ (bottom). If string have ‘A’ then absolute (relative to picture) coordinates is used. See section Dens sample, for sample code and picture.

Method on mglGraph (C++, Python): void Colorbar (const mglData &v, const char *sch="", int where=0)
C function: void mgl_colorbar_val (HMGL gr, const HMDT v, const char *sch, int where)

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.

Method on mglGraph (C++, Python): void Colorbar (const char *sch, int where, float x, float y, float w, float h)
Method on mglGraph (C++, Python): void Colorbar (int where, float x, float y, float w, float h)
C function: void mgl_colorbar_ext (HMGL gr, const char *sch, int where, 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.

Method on mglGraph (C++): void Colorbar (const mglData &v, const char *sch, int where, 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.

Method on mglGraph (C++, Python): 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 an Axis(). The style of lines is determined by pen parameter (default value is dark blue solid line ‘B-’).

Method on mglGraph (C++, Python): void Box (const char *col="", bool ticks=true)
Method on mglGraph (C++): void Box (mglColor col, bool ticks=true)
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 col.

Method on mglGraph (C++, Python): void Label (char dir, const char *text, float pos=0, float size=-1.4, float shift=0)
Method on mglGraph (C++): void Label (char dir, const wchar_t *text, float pos=0, float size=-1.4, 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 size, float shift)
C function: void mgl_labelw_ext (HMGL gr, char dir, const wchar_t *text, float pos, float size, 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. 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-2024
Individual documents may contain additional copyright information.