| [ < ] | [ > ] | [ << ] | [ 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):voidAxis (const char *dir="xyz",booladjust=false) - C function:
voidmgl_axis (HMGLgr,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 ofAdjustTicks()). You may specified an arrow at the end of axis (see see section Line styles)
- Method on
mglGraph(C++, Python):voidColorbar (const char *sch="",intwhere=0) - C function:
voidmgl_colorbar (HMGLgr,const char *sch,intwhere) 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=0for ‘>’ (right),pos=1for ‘<’ (left),pos=2for ‘^’ (top),pos=3for ‘_’ (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):voidColorbar (const mglData &v,const char *sch="",intwhere=0) - C function:
voidmgl_colorbar_val (HMGLgr,const HMDTv,const char *sch,intwhere) 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):voidColorbar (const char *sch,intwhere,floatx,floaty,floatw,floath) - Method on
mglGraph(C++, Python):voidColorbar (intwhere,floatx,floaty,floatw,floath) - C function:
voidmgl_colorbar_ext (HMGLgr,const char *sch,intwhere,floatx,floaty,floatw,floath) 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++):voidColorbar (const mglData &v,const char *sch,intwhere,floatx,floaty,floatw,floath) 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):voidGrid (const char *dir="xyz",const char *pen="B-") - C function:
voidmgl_axis_grid (HMGLgr,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):voidBox (const char *col="",boolticks=true) - Method on
mglGraph(C++):voidBox (mglColorcol,boolticks=true) - C function:
voidmgl_box (HMGLgr,intticks) - C function:
voidmgl_box_rgb (HMGLgr,floatr,floatg,floatb,intticks) - C function:
voidmgl_box_str (HMGLgr,const char *col,intticks) Draws bounding box outside the plotting volume with color col.
- Method on
mglGraph(C++, Python):voidLabel (chardir,const char *text,floatpos=0,floatsize=-1.4,floatshift=0) - Method on
mglGraph(C++):voidLabel (chardir,const wchar_t *text,floatpos=0,floatsize=-1.4,floatshift=0) - C function:
voidmgl_label (HMGLgr,chardir,const char *text) - C function:
voidmgl_label_ext (HMGLgr,chardir,const char *text,floatpos,floatsize,floatshift) - C function:
voidmgl_labelw_ext (HMGLgr,chardir,const wchar_t *text,floatpos,floatsize,floatshift) 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] | [ ? ] |
