['dir'='xyzc']
¶mglGraph
: void
Adjust (const char *
dir="xyzc"
)
¶void
mgl_adjust_ticks (HMGL
gr, const char *
dir)
¶Set the ticks step, number of sub-ticks and initial ticks position to be the most human readable for the axis along direction(s) dir. Also set SetTuneTicks(true)
. Usually you don’t need to call this function except the case of returning to default settings.
val [sub=0 org=nan 'fact'='']
¶val [sub=0 org=nan 'fact'='']
¶val [sub=0 org=nan 'fact'='']
¶val sub ['fact'='']
¶val sub ['fact'='']
¶val sub ['fact'='']
¶val ['fact'='']
¶mglGraph
: void
SetTicks (char
dir, mreal
d=0
, int
ns=0
, mreal
org=NAN
, const char *
fact=""
)
¶mglGraph
: void
SetTicks (char
dir, mreal
d, int
ns, mreal
org, const wchar_t *
fact)
¶void
mgl_set_ticks (HMGL
gr, char
dir, mreal
d, int
ns, mreal
org)
¶void
mgl_set_ticks_fact (HMGL
gr, char
dir, mreal
d, int
ns, mreal
org, const char *
fact)
¶void
mgl_set_ticks_factw (HMGL
gr, char
dir, mreal
d, int
ns, mreal
org, const wchar_t *
fact)
¶Set the ticks step d, number of sub-ticks ns (used for positive d) and initial ticks position org for the axis along direction dir (use ’c’ for colorbar ticks). Variable d set step for axis ticks (if positive) or it’s number on the axis range (if negative). Zero value set automatic ticks. If org value is NAN then axis origin is used. Parameter fact set text which will be printed after tick label (like "\pi" for d=M_PI).
val1
'lbl1' [val2
'lbl2' ...]
¶val1
'lbl1' [val2
'lbl2' ...]
¶val1
'lbl1' [val2
'lbl2' ...]
¶val1
'lbl1' [val2
'lbl2' ...]
¶vdat 'lbls' [add=off
]
¶vdat 'lbls' [add=off
]
¶vdat 'lbls' [add=off
]
¶vdat 'lbls' [add=off
]
¶mglGraph
: void
SetTicksVal (char
dir, const char *
lbl, bool
add=false
)
¶mglGraph
: void
SetTicksVal (char
dir, const wchar_t *
lbl, bool
add=false
)
¶mglGraph
: void
SetTicksVal (char
dir, const mglDataA &
val, const char *
lbl, bool
add=false
)
¶mglGraph
: void
SetTicksVal (char
dir, const mglDataA &
val, const wchar_t *
lbl, bool
add=false
)
¶void
mgl_set_ticks_str (HMGL
gr, char
dir, const char *
lbl, bool
add)
¶void
mgl_set_ticks_wcs (HMGL
gr, char
dir, const wchar_t *
lbl, bool
add)
¶void
mgl_set_ticks_val (HMGL
gr, char
dir, HCDT
val, const char *
lbl, bool
add)
¶void
mgl_set_ticks_valw (HMGL
gr, char
dir, HCDT
val, const wchar_t *
lbl, bool
add)
¶Set the manual positions val and its labels lbl for ticks along axis dir. If array val is absent then values equidistantly distributed in x-axis range are used. Labels are separated by ‘\n’ symbol. If only one value is specified in MGL command then the label will be add to the current ones. Use SetTicks()
to restore automatic ticks.
mglGraph
: void
AddTick (char
dir, double
val, const char *
lbl)
¶mglGraph
: void
AddTick (char
dir, double
val, const wchar_t *
lbl)
¶void
mgl_add_tick (HMGL
gr, char
dir, double
val, const char *
lbl)
¶void
mgl_set_tickw (HMGL
gr, char
dir, double
val, const wchar_t *
lbl)
¶The same as previous but add single tick label lbl at position val to the list of existed ones.
'templ'
¶'templ'
¶'templ'
¶'templ'
¶mglGraph
: void
SetTickTempl (char
dir, const char *
templ)
¶mglGraph
: void
SetTickTempl (char
dir, const wchar_t *
templ)
¶void
mgl_set_tick_templ (HMGL
gr, const char *
templ)
¶void
mgl_set_tick_templw (HMGL
gr, const wchar_t *
templ)
¶Set template templ for x-,y-,z-axis ticks or colorbar ticks. It may contain TeX symbols also. If templ=""
then default template is used (in simplest case it is ‘%.2g’). If template start with ‘&’ symbol then long
integer value will be passed instead of default type double
. Setting on template switch off automatic ticks tuning.
'dir' [dv=0
'tmpl'='']
¶mglGraph
: void
SetTicksTime (char
dir, mreal
val, const char *
templ)
¶void
mgl_set_ticks_time (HMGL
gr, mreal
val, const char *
templ)
¶Sets time labels with step val and template templ for x-,y-,z-axis ticks or colorbar ticks. It may contain TeX symbols also. The format of template templ is the same as described in http://www.manpagez.com/man/3/strftime/. Most common variants are ‘%X’ for national representation of time, ‘%x’ for national representation of date, ‘%Y’ for year with century. If val=0 and/or templ="" then automatic tick step and/or template will be selected. You can use mgl_get_time
() function for obtaining number of second for given date/time string. Note, that MS Visual Studio couldn’t handle date before 1970.
double
mgl_get_time (const char*
str, const char *
templ)
¶Gets number of seconds from 1970 year to specified date/time str. The format of string is specified by templ, which is the same as described in http://www.manpagez.com/man/3/strftime/. Most common variants are ‘%X’ for national representation of time, ‘%x’ for national representation of date, ‘%Y’ for year with century. Note, that MS Visual Studio couldn’t handle date before 1970.
val
[pos=1.15
]
¶mglGraph
: void
SetTuneTicks (int
tune, mreal
pos=1.15
)
¶void
mgl_tune_ticks (HMGL
gr, int
tune, mreal
pos)
¶Switch on/off ticks enhancing by factoring common multiplier (for small, like from 0.001 to 0.002, or large, like from 1000 to 2000, coordinate values – enabled if tune&1 is nonzero) or common component (for narrow range, like from 0.999 to 1.000 – enabled if tune&2 is nonzero). Also set the position pos of common multiplier/component on the axis: =0 at minimal axis value, =1 at maximal axis value. Default value is 1.15.
dx [dy=0 dz=0 dc=0]
¶mglGraph
: void
SetTickShift (mglPoint
d)
¶void
mgl_set_tick_shift (HMGL
gr, mreal
dx, mreal
dy, mreal
dz, mreal
dc)
¶Set value of additional shift for ticks labels.
mglGraph
: void
SetTickRotate (bool
val)
¶void
mgl_set_tick_rotate (HMGL
gr, bool
val)
¶Enable/disable ticks rotation if there are too many ticks or ticks labels are too long.
mglGraph
: void
SetTickSkip (bool
val)
¶void
mgl_set_tick_skip (HMGL
gr, bool
val)
¶Enable/disable ticks skipping if there are too many ticks or ticks labels are too long.
mglGraph
: void
SetTimeUTC (bool
val)
¶Enable/disable using UTC time for ticks labels. In C/Fortran you can use mgl_set_flag(gr,val, MGL_USE_GMTIME);
.
val
¶mglGraph
: void
SetOriginTick (bool
val=true
)
¶Enable/disable drawing of ticks labels at axis origin. In C/Fortran you can use mgl_set_flag(gr,val, MGL_NO_ORIGIN);
.
val
[stt=1
]
¶mglGraph
: void
SetTickLen (mreal
val, mreal
stt=1
)
¶void
mgl_set_tick_len (HMGL
gr, mreal
val, mreal
stt)
¶The relative length of axis ticks. Default value is 0.1
. Parameter stt>0 set relative length of subticks which is in sqrt(1+stt)
times smaller.
'stl' ['tck'='' 'sub'='']
¶mglGraph
: void
SetAxisStl (const char *
stl="k"
, const char *
tck=0
, const char *
sub=0
)
¶void
mgl_set_axis_stl (HMGL
gr, const char *
stl, const char *
tck, const char *
sub)
¶The line style of axis (stl), ticks (tck) and subticks (sub). If stl is empty then default style is used (‘k’ or ‘w’ depending on transparency type). If tck or sub is empty then axis style is used (i.e. stl).