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.
['dir'='xyz' 'stl'='']
¶mglGraph
: void
Axis (const char *
dir="xyz"
, const char *
stl=""
, const char *
opt=""
)
¶void
mgl_axis (HMGL
gr, const char *
dir, const char *
stl, const char *
opt)
¶Draws axes with ticks (see Axis settings). Parameter dir may contain:
Styles of ticks and axis can be overrided by using stl string. Option value
set the manual rotation angle for the ticks. See Axis and ticks, for sample code and picture.
['sch'='']
¶mglGraph
: void
Colorbar (const char *
sch=""
, const char *
opt=""
)
¶void
mgl_colorbar (HMGL
gr, const char *
sch, const char *
opt)
¶Draws colorbar. Parameter sch may contain:
See Colorbars, for sample code and picture.
vdat ['sch'='']
¶mglGraph
: void
Colorbar (const mglDataA &
v, const char *
sch=""
, const char *
opt=""
)
¶void
mgl_colorbar_val (HMGL
gr, HCDT
v, const char *
sch, const char *
opt)
¶The same as previous but with sharp colors sch (current palette if sch=""
) for values v. See Sample ‘contd’, for sample code and picture.
'sch' x y [w=1 h=1]
¶mglGraph
: void
Colorbar (const char *
sch, mreal
x, mreal
y, mreal
w=1
, mreal
h=1
, const char *
opt=""
)
¶void
mgl_colorbar_ext (HMGL
gr, const char *
sch, mreal
x, mreal
y, mreal
w, mreal
h, const char *
opt)
¶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.
vdat 'sch' x y [w=1 h=1]
¶mglGraph
: void
Colorbar (const mglDataA &
v, const char *
sch, mreal
x, mreal
y, mreal
w=1
, mreal
h=1
, const char *
opt=""
)
¶void
mgl_colorbar_val_ext (HMGL
gr, HCDT
v, const char *
sch, mreal
x, mreal
y, mreal
w, mreal
h, const char *
opt)
¶The same as previous but with sharp colors sch (current palette if sch=""
) for values v. See Sample ‘contd’, for sample code and picture.
['dir'='xyz' 'pen'='B']
¶mglGraph
: void
Grid (const char *
dir="xyz"
, const char *
pen="B"
, const char *
opt=""
)
¶void
mgl_axis_grid (HMGL
gr, const char *
dir, const char *
pen, const char *
opt)
¶Draws grid lines perpendicular to direction determined by string parameter dir. If dir contain ‘!’ then grid lines will be drawn at coordinates of subticks also. 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-’).
['stl'='k' ticks=on
]
¶mglGraph
: void
Box (const char *
col=""
, bool
ticks=true
)
¶void
mgl_box (HMGL
gr)
¶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 Bounding box, for sample code and picture.
'text' [pos=1
]
¶'text' [pos=1
]
¶'text' [pos=1
]
¶'text' [pos=1
]
¶'text' [pos=1
]
¶mglGraph
: void
Label (char
dir, const char *
text, mreal
pos=1
, const char *
opt=""
)
¶mglGraph
: void
Label (char
dir, const wchar_t *
text, mreal
pos=1
, const char *
opt=""
)
¶void
mgl_label (HMGL
gr, char
dir, const char *
text, mreal
pos, const char *
opt)
¶void
mgl_labelw (HMGL
gr, char
dir, const wchar_t *
text, mreal
pos, const char *
opt)
¶Prints the label text for axis dir=‘x’,‘y’,‘z’,‘t’,‘c’, where ‘t’ is “ternary” axis t=1-x-y; ‘c’ is color axis (should be called after colorbar). 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. Option value
set additional shifting of the label. See Text printing.