| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
4.3.3 Ticks
- MGL command: adjust ['dir'='xyzc']
- Method on
mglGraph:voidAdjust (const char *dir="xyzc") - C function:
voidmgl_adjust_ticks (HMGLgr,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.
- MGL command: xtick
val [sub=0 org=nan] - MGL command: ytick
val [sub=0 org=nan] - MGL command: ztick
val [sub=0 org=nan] - MGL command: ctick
val [sub=0 org=nan] - Method on
mglGraph:voidSetTicks (chardir,mreald=0,intns=0,mrealorg=NAN) - C function:
voidmgl_set_ticks (HMGLgr,chardir,mreald,intns,mrealorg) 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.
- MGL command: xtick
val1'lbl1' [val2'lbl2' ...] - MGL command: ytick
val1'lbl1' [val2'lbl2' ...] - MGL command: ztick
val1'lbl1' [val2'lbl2' ...] - Method on
mglGraph:voidSetTicksVal (chardir,const char *lbl,booladd=false) - Method on
mglGraph:voidSetTicksVal (chardir,const wchar_t *lbl,booladd=false) - Method on
mglGraph:voidSetTicksVal (chardir,const mglDataA &val,const char *lbl,booladd=false) - Method on
mglGraph:voidSetTicksVal (chardir,const mglDataA &val,const wchar_t *lbl,booladd=false) - C function:
voidmgl_set_ticks_str (HMGLgr,chardir,const char *lbl,booladd) - C function:
voidmgl_set_ticks_wcs (HMGLgr,chardir,const wchar_t *lbl,booladd) - C function:
voidmgl_set_ticks_val (HMGLgr,chardir,HCDTval,const char *lbl,booladd) - C function:
voidmgl_set_ticks_valw (HMGLgr,chardir,HCDTval,const wchar_t *lbl,booladd) Set the manual positions val and its labels lbl for ticks along axis dir. If array val is absent then values equidistantly distributed in interval [Min.x, Max.x] are used. Labels are separated by ‘\n’ symbol. Use
SetTicks()to restore automatic ticks.
- MGL command: xtick 'templ'
- MGL command: ytick 'templ'
- MGL command: ztick 'templ'
- MGL command: ctick 'templ'
- Method on
mglGraph:voidSetTickTempl (chardir,const char *templ) - Method on
mglGraph:voidSetTickTempl (chardir,const wchar_t *templ) - C function:
voidmgl_set_tick_templ (HMGLgr,const char *templ) - C function:
voidmgl_set_tick_templw (HMGLgr,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’). Setting on template switch off automatic ticks tuning.
- MGL command: ticktime 'dir' [
dv'tmpl'] - Method on
mglGraph:voidSetTicksTime (chardir,mrealval,const char *templ) - C function:
voidmgl_set_ticks_time (HMGLgr,mrealval,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.
- C function:
doublemgl_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.
- MGL command: tuneticks
val[pos=1.15] - Method on
mglGraph:voidSetTuneTicks (inttune,mrealpos=1.15) - C function:
voidmgl_tune_ticks (HMGLgr,inttune,mrealpos) 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. If tune&4 is nonzero then zeros will be added to fixed width of all axis labels.
- MGL command: tickshift
dx [dy=0 dz=0 dc=0] - Method on
mglGraph:voidSetTickShift (mglPointd) - C function:
voidmgl_set_tick_shift (HMGLgr,mrealdx,mrealdy,mrealdz,mrealdc) Set value of additional shift for ticks labels.
- Method on
mglGraph:voidSetTickRotate (boolval) - C function:
voidmgl_set_tick_rotate (HMGLgr,boolval) Enable/disable ticks rotation if there are too many ticks or ticks labels are too long.
- Method on
mglGraph:voidSetTickSkip (boolval) - C function:
voidmgl_set_tick_skip (HMGLgr,boolval) Enable/disable ticks skipping if there are too many ticks or ticks labels are too long.
- Method on
mglGraph:voidSetTimeUTC (boolval) Enable/disable using UTC time for ticks labels. In C/Fortran you can use
mgl_set_flag(gr,val, MGL_USE_GMTIME);.
- MGL command: origintick
val - Method on
mglGraph:voidSetOriginTick (boolval=true) Enable/disable drawing of ticks labels at axis origin. In C/Fortran you can use
mgl_set_flag(gr,val, MGL_NO_ORIGIN);.
- MGL command: ticklen
val[stt=1] - Method on
mglGraph:voidSetTickLen (mrealval,mrealstt=1) - C function:
voidmgl_set_tick_len (HMGLgr,mrealval,mrealstt) The relative length of axis ticks. Default value is
0.1. Parameter stt>0 set relative length of subticks which is insqrt(1+stt)times smaller.
- MGL command: axisstl 'stl' ['tck'='' 'sub'='']
- Method on
mglGraph:voidSetAxisStl (const char *stl="k",const char *tck=0,const char *sub=0) - C function:
voidmgl_set_axis_stl (HMGLgr,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).
| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on March 21, 2014 using texi2html 5.0.
