manpagez: man pages & more
info mathgl
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.10 2D plotting (MGL)

These commands perform plotting of 2D data. 2D means that data depend from 2 independent parameters like matrix f(x_i,y_j), i=1...n, j=1...m. There are 6 generally different types of data representations: simple mesh lines plot (mesh), surface plot (surf), surface plot by boxes (boxs), surface plot by tiles (tile), waterfall-like plot (fall), belt plot (belt), density plot (dens), contour lines plot (cont), solid contours plot (contf) and its rotational figure (axial). Commands cont, contf and axial have variants for automatic and manual selection of level values for contours. Also there are commands for plotting data grid lines according to the data format (grid) for enhancing density or contour plots. Each type of plotting has similar interface. There are 2 kind of versions which handle the arrays of data and coordinates or only single data array. See section 2D plot sample, for sample code and picture.

String parameter sch sets the color scheme (see section Color scheme). Previous color scheme is used by default. The minor dimensions of arrays xdat, ydat, zdat should be equal xdat.nx=zdat.nx && ydat.nx=zdat.ny or xdat.nx=ydat.nx=zdat.nx && xdat.ny=ydat.ny=zdat.ny. Arrays xdat and ydat can be vectors (not matrices as zdat). If array xdat, ydat is not specified then its an automatic arrays are used with values equidistantly distributed along x, y. Graphics are plotted for each z-slice of the data.

MGL command: surf zdat ['sch'='']
MGL command: surf xdat ydat zdat ['sch'='']

Draws surface specified parametrically {xdat[i,j], ydat[i,j], zdat[i,j]}. See also mesh, dens, belt, tile, boxs, surfc, surfa. See section Surf sample, for sample code and picture.

MGL command: mesh zdat ['sch'='']
MGL command: mesh xdat ydat zdat ['sch'='']

Draws mesh lines for surface specified parametrically {xdat[i,j], ydat[i,j], zdat[i,j]}. See also surf, fall, meshnum, cont, tens. See section Mesh sample, for sample code and picture.

MGL command: fall zdat ['sch'='']
MGL command: fall xdat ydat zdat ['sch'='']

Draws fall lines for surface specified parametrically {xdat[i,j], ydat[i,j], zdat[i,j]}. If sch contain ‘x’ then lines are drawn along x-direction else (by default) lines are drawn along y-direction. See also belt, mesh, tens, meshnum. See section Fall sample, for sample code and picture.

MGL command: belt zdat ['sch'='']
MGL command: belt xdat ydat zdat ['sch'='']

Draws belts for surface specified parametrically {xdat[i,j], ydat[i,j], zdat[i,j]}. If sch contain ‘x’ then belts are drawn along x-direction else (by default) lines are drawn along y-direction. See also fall, surf, plot, meshnum. See section Belt sample, for sample code and picture.

MGL command: boxs zdat ['sch'='']
MGL command: boxs xdat ydat zdat ['sch'='']

Draws vertical boxes for surface specified parametrically {xdat[i,j], ydat[i,j], zdat[i,j]}. See also surf, dens, tile, step. See section Boxs sample, for sample code and picture.

MGL command: tile zdat ['sch'='']
MGL command: tile xdat ydat zdat ['sch'='']

Draws horizontal tiles for surface specified parametrically {xdat[i,j], ydat[i,j], zdat[i,j]}. Such plot can be used as 3d generalization of step. See also surf, boxs, step, tiles. See section Tile sample, for sample code and picture.

MGL command: dens zdat ['sch'='' zval=nan]
MGL command: dens xdat ydat zdat ['sch'='' zval=nan]

Draws density plot for surface specified parametrically {xdat[i,j], ydat[i,j], zdat[i,j]} at z = zVal. See also surf, cont, contf, boxs, tile, dens[xyz]. See section Dens sample, for sample code and picture.

MGL command: cont vdat zdat ['sch'='' zval=nan]
MGL command: cont vdat xdat ydat zdat ['sch'='' zval=nan]

Draws contour lines for surface specified parametrically {xdat[i,j], ydat[i,j], zdat[i,j]} at z = zVal (or for z=vdat[k] if zval=nan). Contours are plotted for zdat[i,j]=vdat[k] for all k. If string stl contain ’t’ (or ’T’) symbol then contour labels will be drawn below (or above) the contours. See also dens, contf, contd, axial, cont[xyz]. See section Cont sample, for sample code and picture.

MGL command: cont zdat ['sch'='' num=7 zval=nan]
MGL command: cont xdat ydat zdat ['sch'='' num=7 zval=nan]

The same as previous one with vector vdat of num-th elements equidistantly distributed in color range (see, caxis).

MGL command: contf vdat zdat ['sch'='' zval=nan]
MGL command: contf vdat xdat ydat zdat ['sch'='' zval=nan]

Draws solid (or filled) contours for surface specified parametrically {xdat[i,j], ydat[i,j], zdat[i,j]} at z = zVal (or for z=vdat[k] if zval=nan). Contours are plotted for zdat[i,j]=vdat[k] for all k (must be vdat.nx>2). See also dens, cont, contd, contf[xyz]. See section ContF sample, for sample code and picture.

MGL command: contf zdat ['sch'='' num=7 zval=nan]
MGL command: contf xdat ydat zdat ['sch'='' num=7 zval=nan]

The same as previous one with vector vdat of num-th elements equidistantly distributed in color range (see, caxis).

MGL command: contd vdat zdat ['sch'='' zval=nan]
MGL command: contd vdat xdat ydat zdat ['sch'='' zval=nan]

Draws solid (or filled) contours for surface specified parametrically {xdat[i,j], ydat[i,j], zdat[i,j]} at z = zVal (or for z=vdat[k] if zval=nan) with manual colors. Contours are plotted for zdat[i,j]=vdat[k] for all k (must be vdat.nx>2). The color of k-th contour is sch[k%strlen(sch)]. See also dens, cont, contf. See section ContD sample, for sample code and picture.

MGL command: contd zdat ['sch'='' num=7 zval=nan]
MGL command: contd xdat ydat zdat ['sch'='' num=7 zval=nan]

The same as previous one with vector vdat of num-th elements equidistantly distributed in color range (see, caxis).

MGL command: axial vdat zdat ['sch'='']
MGL command: axial vdat xdat ydat zdat ['sch'='']

Draws surface which is result of contour plot rotation surface specified parametrically {xdat[i,j], ydat[i,j], zdat[i,j]}. Contours are plotted for zdat[i,j]=vdat[k] for all k. If string sch have symbol ‘#’ then wire plot is produced. If string sch contain symbols ‘x’, ‘y’ or ‘z’ then rotation axis axialdir will be set to specified direction. If string sch have symbol ‘#’ then wire plot is produced. See also cont, contf, torus, surf3. See section Axial sample, for sample code and picture.

MGL command: axial zdat ['sch'='' num=3]
MGL command: axial xdat ydat zdat ['sch'='' num=3]

The same as previous one with vector vdat of num-th elements equidistantly distributed in color range (see, caxis).

MGL command: grad pdat ['sch'='' num=5 zval=nan]
MGL command: grad xdat ydat pdat ['sch'='' num=5 zval=nan]
MGL command: grad xdat ydat zdat pdat ['sch'='' num=5]

Draws gradient lines for scalar field pdat specified parametrically {xdat[i,j], ydat[i,j]} or {xdat[i,j,k], ydat[i,j,k], zdat[i,j,k]}. String sch sets the color scheme. Previous color scheme is used by default. Number of lines is proportional to num. If num<0 then lines start from borders only. See also dens, cont, dens3, cont3, flow. See section Grad sample, for sample code and picture.

MGL command: grid2 zdat ['sch'='' zval=nan]
MGL command: grid2 xdat ydat zdat ['sch'='' zval=nan]

Draws grid lines for density plot of surface specified parametrically {xdat[i,j], ydat[i,j], zdat[i,j]} at z = zVal. See also dens, cont, contf.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]
© manpagez.com 2000-2024
Individual documents may contain additional copyright information.