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

4.11 2D plotting

These functions 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. By default (if absent) values of x, y are equidistantly distributed in axis range. The plots are drawn for each z slice of the data. The minor dimensions of arrays x, y, z should be equal x.nx=z.nx && y.nx=z.ny or x.nx=y.nx=z.nx && x.ny=y.ny=z.ny. Arrays x and y can be vectors (not matrices as z). String sch sets the color scheme (see Color scheme) for plot. String opt contain command options (see Command options). See section 2D samples, for sample code and picture.

MGL command: surf zdat ['sch'='']
MGL command: surf xdat ydat zdat ['sch'='']
Method on mglGraph: void Surf (const mglDataA &z, const char *sch="", const char *opt="")
Method on mglGraph: void Surf (const mglDataA &x, const mglDataA &y, const mglDataA &z, const char *sch="", const char *opt="")
C function: void mgl_surf (HMGL gr, HCDT z, const char *sch, const char *opt)
C function: void mgl_surf_xy (HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)

The function draws surface specified parametrically {x[i,j], y[i,j], z[i,j]}. If string sch have symbol ‘#’ then grid lines are drawn. If string sch have symbol ‘.’ then plot by dots is produced. 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'='']
Method on mglGraph: void Mesh (const mglDataA &z, const char *sch="", const char *opt="")
Method on mglGraph: void Mesh (const mglDataA &x, const mglDataA &y, const mglDataA &z, const char *sch="", const char *opt="")
C function: void mgl_mesh (HMGL gr, HCDT z, const char *sch, const char *opt)
C function: void mgl_mesh_xy (HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)

The function draws mesh lines for surface specified parametrically {x[i,j], y[i,j], z[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'='']
Method on mglGraph: void Fall (const mglDataA &z, const char *sch="", const char *opt="")
Method on mglGraph: void Fall (const mglDataA &x, const mglDataA &y, const mglDataA &z, const char *sch="", const char *opt="")
C function: void mgl_fall (HMGL gr, HCDT z, const char *sch, const char *opt)
C function: void mgl_fall_xy (HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)

The function draws fall lines for surface specified parametrically {x[i,j], y[i,j], z[i,j]}. This plot can be used for plotting several curves shifted in depth one from another. 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'='']
Method on mglGraph: void Belt (const mglDataA &z, const char *sch="", const char *opt="")
Method on mglGraph: void Belt (const mglDataA &x, const mglDataA &y, const mglDataA &z, const char *sch="", const char *opt="")
C function: void mgl_belt (HMGL gr, HCDT z, const char *sch, const char *opt)
C function: void mgl_belt_xy (HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)

The function draws belts for surface specified parametrically {x[i,j], y[i,j], z[i,j]}. This plot can be used as 3d generalization of plot). If sch contain ‘x’ then belts are drawn along x-direction else (by default) belts 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'='']
Method on mglGraph: void Boxs (const mglDataA &z, const char *sch="", const char *opt="")
Method on mglGraph: void Boxs (const mglDataA &x, const mglDataA &y, const mglDataA &z, const char *sch="", const char *opt="")
C function: void mgl_boxs (HMGL gr, HCDT z, const char *sch, const char *opt)
C function: void mgl_boxs_xy (HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)

The function draws vertical boxes for surface specified parametrically {x[i,j], y[i,j], z[i,j]}. Symbol ‘@’ in sch set to draw filled boxes. 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'='']
Method on mglGraph: void Tile (const mglDataA &z, const char *sch="", const char *opt="")
Method on mglGraph: void Tile (const mglDataA &x, const mglDataA &y, const mglDataA &z, const char *sch="", const char *opt="")
C function: void mgl_tile (HMGL gr, HCDT z, const char *sch, const char *opt)
C function: void mgl_tile_xy (HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)

The function draws horizontal tiles for surface specified parametrically {x[i,j], y[i,j], z[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'='']
MGL command: dens xdat ydat zdat ['sch'='']
Method on mglGraph: void Dens (const mglDataA &z, const char *sch="", const char *opt="", mreal zVal=NAN)
Method on mglGraph: void Dens (const mglDataA &x, const mglDataA &y, const mglDataA &z, const char *sch="", const char *opt="", mreal zVal=NAN)
C function: void mgl_dens (HMGL gr, HCDT z, const char *sch, const char *opt)
C function: void mgl_dens_xy (HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)

The function draws density plot for surface specified parametrically {x[i,j], y[i,j], z[i,j]} at z = Min.z. If string sch have symbol ‘#’ then grid lines are drawn. If string sch have symbol ‘.’ then plot by dots is produced. See also surf, cont, contf, boxs, tile, dens[xyz]. See section Dens sample, for sample code and picture.

MGL command: cont vdat zdat ['sch'='']
MGL command: cont vdat xdat ydat zdat ['sch'='']
Method on mglGraph: void Cont (const mglDataA &v, const mglDataA &z, const char *sch="", const char *opt="")
Method on mglGraph: void Cont (const mglDataA &v, const mglDataA &x, const mglDataA &y, const mglDataA &z, const char *sch="", const char *opt="")
C function: void mgl_cont__val (HMGL gr, HCDT v, HCDT z, const char *sch, const char *opt)
C function: void mgl_cont_xy_val (HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)

The function draws contour lines for surface specified parametrically {x[i,j], y[i,j], z[i,j]} at z=v[k] or at z = Min.z if sch contain symbol ‘_’. Contours are plotted for z[i,j]=v[k] where v[k] are values of data array v. If string sch have symbol ‘t’ or ‘T’ then contour labels v[k] 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'='']
MGL command: cont xdat ydat zdat ['sch'='']
Method on mglGraph: void Cont (const mglDataA &z, const char *sch="", const char *opt="")
Method on mglGraph: void Cont (const mglDataA &x, const mglDataA &y, const mglDataA &z, const char *sch="", const char *opt="")
C function: void mgl_cont (HMGL gr, HCDT z, const char *sch, const char *opt)
C function: void mgl_cont_xy (HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)

The same as previous with vector v of num-th elements equidistantly distributed in color range. Here num is equal to parameter value in options opt (default is 7).

MGL command: contf vdat zdat ['sch'='']
MGL command: contf vdat xdat ydat zdat ['sch'='']
Method on mglGraph: void ContF (const mglDataA &v, const mglDataA &z, const char *sch="", const char *opt="")
Method on mglGraph: void ContF (const mglDataA &v, const mglDataA &x, const mglDataA &y, const mglDataA &z, const char *sch="", const char *opt="")
C function: void mgl_contf_val (HMGL gr, HCDT v, HCDT z, const char *sch, const char *opt)
C function: void mgl_contf_xy_val (HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)

The function draws solid (or filled) contour lines for surface specified parametrically {x[i,j], y[i,j], z[i,j]} at z=v[k] or at z = Min.z if sch contain symbol ‘_’. Contours are plotted for z[i,j]=v[k] where v[k] are values of data array v (must be v.nx>2). See also dens, cont, contd, contf[xyz]. See section ContF sample, for sample code and picture.

MGL command: contf zdat ['sch'='']
MGL command: contf xdat ydat zdat ['sch'='']
Method on mglGraph: void ContF (const mglDataA &z, const char *sch="", const char *opt="")
Method on mglGraph: void ContF (const mglDataA &x, const mglDataA &y, const mglDataA &z, const char *sch="", const char *opt="")
C function: void mgl_contf (HMGL gr, HCDT z, const char *sch, const char *opt)
C function: void mgl_contf_xy (HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)

The same as previous with vector v of num-th elements equidistantly distributed in color range. Here num is equal to parameter value in options opt (default is 7).

MGL command: contd vdat zdat ['sch'='']
MGL command: contd vdat xdat ydat zdat ['sch'='']
Method on mglGraph: void ContD (const mglDataA &v, const mglDataA &z, const char *sch="", const char *opt="")
Method on mglGraph: void ContD (const mglDataA &v, const mglDataA &x, const mglDataA &y, const mglDataA &z, const char *sch="", const char *opt="")
C function: void mgl_contd_val (HMGL gr, HCDT v, HCDT z, const char *sch, const char *opt)
C function: void mgl_contd_xy_val (HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)

The function draws solid (or filled) contour lines for surface specified parametrically {x[i,j], y[i,j], z[i,j]} at z=v[k] (or at z = Min.z if sch contain symbol ‘_’) with manual colors. Contours are plotted for z[i,j]=v[k] where v[k] are values of data array v (must be v.nx>2). String sch sets the contour colors: the color of k-th contour is determined by character sch[k%strlen(sch)]. See also dens, cont, contf. See section ContD sample, for sample code and picture.

MGL command: contd zdat ['sch'='']
MGL command: contd xdat ydat zdat ['sch'='']
Method on mglGraph: void ContD (const mglDataA &z, const char *sch="", const char *opt="")
Method on mglGraph: void ContD (const mglDataA &x, const mglDataA &y, const mglDataA &z, const char *sch="", const char *opt="")
C function: void mgl_contd (HMGL gr, HCDT z, const char *sch, const char *opt)
C function: void mgl_contd_xy (HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)

The same as previous with vector v of num-th elements equidistantly distributed in color range. Here num is equal to parameter value in options opt (default is 7).

MGL command: contv vdat zdat ['sch'='']
MGL command: contv vdat xdat ydat zdat ['sch'='']
Method on mglGraph: void ContV (const mglDataA &v, const mglDataA &z, const char *sch="", const char *opt="")
Method on mglGraph: void ContV (const mglDataA &v, const mglDataA &x, const mglDataA &y, const mglDataA &z, const char *sch="", const char *opt="")
C function: void mgl_contv_val (HMGL gr, HCDT v, HCDT z, const char *sch, const char *opt)
C function: void mgl_contv_xy_val (HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)

The function draws vertical cylinder (tube) at contour lines for surface specified parametrically {x[i,j], y[i,j], z[i,j]} at z=v[k] or at z = Min.z if sch contain symbol ‘_’. Contours are plotted for z[i,j]=v[k] where v[k] are values of data array v. See also cont, contf. See section ContV sample, for sample code and picture.

MGL command: contv zdat ['sch'='']
MGL command: contv xdat ydat zdat ['sch'='']
Method on mglGraph: void ContV (const mglDataA &z, const char *sch="", const char *opt="")
Method on mglGraph: void ContV (const mglDataA &x, const mglDataA &y, const mglDataA &z, const char *sch="", const char *opt="")
C function: void mgl_contv (HMGL gr, HCDT z, const char *sch, const char *opt)
C function: void mgl_contv_xy (HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)

The same as previous with vector v of num-th elements equidistantly distributed in color range. Here num is equal to parameter value in options opt (default is 7).

MGL command: axial vdat zdat ['sch'='']
MGL command: axial vdat xdat ydat zdat ['sch'='']
Method on mglGraph: void Axial (const mglDataA &v, const mglDataA &z, const char *sch="", const char *opt="")
Method on mglGraph: void Axial (const mglDataA &v, const mglDataA &x, const mglDataA &y, const mglDataA &z, const char *sch="", const char *opt="")
C function: void mgl_axial_val (HMGL gr, HCDT v, HCDT z, const char *sch, const char *opt)
C function: void mgl_axial_xy_val (HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)

The function draws surface which is result of contour plot rotation for surface specified parametrically {x[i,j], y[i,j], z[i,j]}. Contours are plotted for z[i,j]=v[k] where v[k] are values of data array v. If string sch have symbol ‘#’ then wire plot is produced. If string sch have symbol ‘.’ then plot by dots is produced. If string contain symbols ‘x’ or ‘z’ then rotation axis will be set to specified direction (default is ‘y’). See also cont, contf, torus, surf3. See section Axial sample, for sample code and picture.

MGL command: axial zdat ['sch'='']
MGL command: axial xdat ydat zdat ['sch'='']
Method on mglGraph: void Axial (const mglDataA &z, const char *sch="", const char *opt="", int num=3)
Method on mglGraph: void Axial (const mglDataA &x, const mglDataA &y, const mglDataA &z, const char *sch="", const char *opt="", int num=3)
C function: void mgl_axial (HMGL gr, HCDT z, const char *sch, const char *opt)
C function: void mgl_axial_xy (HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)

The same as previous with vector v of num-th elements equidistantly distributed in color range. Here num is equal to parameter value in options opt (default is 3).

MGL command: grid2 zdat ['sch'='']
MGL command: grid2 xdat ydat zdat ['sch'='']
Method on mglGraph: void Grid (const mglDataA &z, const char *sch="", const char *opt="")
Method on mglGraph: void Grid (const mglDataA &x, const mglDataA &y, const mglDataA &z, const char *sch="", const char *opt="")
C function: void mgl_grid (HMGL gr, HCDT z, const char *sch, const char *opt)
C function: void mgl_grid_xy (HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)

The function draws grid lines for density plot of surface specified parametrically {x[i,j], y[i,j], z[i,j]} at z = Min.z. See also dens, cont, contf, meshnum.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on March 21, 2014 using texi2html 5.0.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.