| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
3.3 Transformation matrix
These functions control how and where further plotting will be placed. There is a curtain order of calling of these functions for the better plot view. First one should be SubPlot() or InPlot() for specifying the place. After it a Rotate() and Aspect(). And finally any other plotting functions may be called. Alternatevely you can use ColumnPlot() for position plots in the column one by another without gap between plot axis (bounding boxes).
- Method on
mglGraph(C++, Python):voidSubPlot (intnx,intny,intm,floatdx=0,floatdy=0) - C function:
voidmgl_subplot (HMGLgr,intnx,intny,intm) - C function:
voidmgl_subplot_d (HMGLgr,intnx,intny,intm,floatdx,floatdy) Puts further plotting in a m-th cell of nx*ny grid of the whole frame area. This function set off any aspects or rotations. So it should be used first for creating the subplot. From the aesthetical point of view it is not recommended to use this function with different matrices in the same frame. The position of the cell can be shifted from its default position by relative size dx, dy.
- Method on
mglGraph(C++, Python):voidSubPlot (intnx,intny,intm,const char *style) - C function:
voidmgl_subplot_s (HMGLgr,intnx,intny,intm,const char *style) The same as previous but space reserved for axis/colorbar is saved only if style contain: ‘L’ or ‘<’ – at left side, ‘R’ or ‘>’ – at right side, ‘A’ or ‘^’ – at top side, ‘U’ or ‘_’ – at bottom side.
- Method on
mglGraph(C++, Python):voidInPlot (floatx1,floatx2,floaty1,floaty2,boolrel=false) - C function:
voidmgl_inplot (HMGLgr,floatx1,floatx2,floaty1,floaty2) - C function:
voidmgl_relplot (HMGLgr,floatx1,floatx2,floaty1,floaty2) Puts further plotting in some region of the whole frame surface. This function allows one to create a plot in arbitrary place of the screen. The position is defined by rectangular coordinates [x1, x2]*[y1, y2]. The coordinates x1, x2, y1, y2 are normalized to interval [0, 1]. If parameter rel=
truethen the relative position to current SubPlot() (or last InPlot() with rel=false) is used. This function set off any aspects or rotations. So it should be used first for creating subplot.
- Method on
mglGraph(C++, Python):voidColumnPlot (intnum,intind,floatd=0) - C function:
voidmgl_columnplot (HMGLgr,intnum,intind) - C function:
voidmgl_columnplot_d (HMGLgr,intnum,intind,floatd) Puts further plotting in ind-th cell of column with num cells. The position is relative to previous SubPlot() call (or InPlot() with rel=
false). Parameter d set extra gap between cells. See section ColumnPlot sample, for sample code and picture.
- Method on
mglGraph(C++, Python):voidStickPlot (intnum,intind,floattet,floatphi) - C function:
voidmgl_stickplot (HMGLgr,intnum,intind,floattet,floatphi) Puts further plotting in ind-th cell of stick with num cells. At this, stick is rotated on angles tet, phi. The position is relative to previous SubPlot() call (or InPlot() with rel=
false). See section StickPlot sample, for sample code and picture.
- Method on
mglGraph(C++, Python):voidRotate (floatTetX,floatTetZ,floatTetY=0) - C function:
voidmgl_rotate (HMGLgr,floatTetX,floatTetZ,floatTetY) Rotates a further plotting relative to each axis {x, z, y} consecutively on angles TetX, TetZ, TetY.
- Method on
mglGraph(C++, Python):voidRotateN (floatTet,floatx,floaty,floatz) - C function:
voidmgl_rotate_vector (HMGLgr,float Tet,float x,float y,float z) Rotates a further plotting around vector {x, y, z} on angle Tet.
- Method on
mglGraph(C++, Python):voidAspect (floatAx,floatAy,floatAz) - C function:
voidmgl_aspect (HMGLgr,floatAx,floatAy,floatAz) Defines aspect ratio for the plot. The viewable axes will be related one to another as the ratio Ax:Ay:Az. For the best effect it should be used after Rotate() function.
- Method on
mglGraph(C++, Python):voidPerspective (floata) - C function:
voidmgl_perspective (HMGLgr,floata) Add (switch on) the perspective to plot. The parameter a ~ 1/z_eff \in [0,1). By default (
a=0) the perspective is off.
- Method on
mglGraph(C++, Python):voidIdentity (boolrel=false) - C function:
voidmgl_identity (HMGLgr,intrel) Clears transformation matrix. This function clears all previous effects of Aspect(), SubPlot(), InPlot() or Rotate() functions. It is equivalent to the call of
InPlot(0,1,0,1,rel).
- Method on
mglGraph(C++, Python):voidPush () - C function:
voidmgl_mat_push (HMGLgr) Push transformation matrix into stack. Later you can restore its current state by Pop() function. Stack can keep up to 10 matrices.
- Method on
mglGraph(C++, Python):voidPop () - C function:
voidmgl_mat_pop (HMGLgr) Pop (restore last ’pushed’) transformation matrix into stack.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
