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).
zdat ['sch'='']
¶xdat ydat zdat ['sch'='']
¶mglGraph
: void
Surf (const mglDataA &
z, const char *
sch=""
, const char *
opt=""
)
¶mglGraph
: void
Surf (const mglDataA &
x, const mglDataA &
y, const mglDataA &
z, const char *
sch=""
, const char *
opt=""
)
¶void
mgl_surf (HMGL
gr, HCDT
z, const char *
sch, const char *
opt)
¶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 Sample ‘surf’, for sample code and picture.
zdat ['sch'='']
¶xdat ydat zdat ['sch'='']
¶mglGraph
: void
Mesh (const mglDataA &
z, const char *
sch=""
, const char *
opt=""
)
¶mglGraph
: void
Mesh (const mglDataA &
x, const mglDataA &
y, const mglDataA &
z, const char *
sch=""
, const char *
opt=""
)
¶void
mgl_mesh (HMGL
gr, HCDT
z, const char *
sch, const char *
opt)
¶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 Sample ‘mesh’, for sample code and picture.
zdat ['sch'='']
¶xdat ydat zdat ['sch'='']
¶mglGraph
: void
Fall (const mglDataA &
z, const char *
sch=""
, const char *
opt=""
)
¶mglGraph
: void
Fall (const mglDataA &
x, const mglDataA &
y, const mglDataA &
z, const char *
sch=""
, const char *
opt=""
)
¶void
mgl_fall (HMGL
gr, HCDT
z, const char *
sch, const char *
opt)
¶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 Sample ‘fall’, for sample code and picture.
zdat ['sch'='']
¶xdat ydat zdat ['sch'='']
¶mglGraph
: void
Belt (const mglDataA &
z, const char *
sch=""
, const char *
opt=""
)
¶mglGraph
: void
Belt (const mglDataA &
x, const mglDataA &
y, const mglDataA &
z, const char *
sch=""
, const char *
opt=""
)
¶void
mgl_belt (HMGL
gr, HCDT
z, const char *
sch, const char *
opt)
¶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, beltc, plot, meshnum. See Sample ‘belt’, for sample code and picture.
zdat ['sch'='']
¶xdat ydat zdat ['sch'='']
¶mglGraph
: void
Boxs (const mglDataA &
z, const char *
sch=""
, const char *
opt=""
)
¶mglGraph
: void
Boxs (const mglDataA &
x, const mglDataA &
y, const mglDataA &
z, const char *
sch=""
, const char *
opt=""
)
¶void
mgl_boxs (HMGL
gr, HCDT
z, const char *
sch, const char *
opt)
¶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 Sample ‘boxs’, for sample code and picture.
zdat ['sch'='']
¶xdat ydat zdat ['sch'='']
¶xdat ydat zdat cdat ['sch'='']
¶mglGraph
: void
Tile (const mglDataA &
z, const char *
sch=""
, const char *
opt=""
)
¶mglGraph
: void
Tile (const mglDataA &
x, const mglDataA &
y, const mglDataA &
z, const char *
sch=""
, const char *
opt=""
)
¶mglGraph
: void
Tile (const mglDataA &
x, const mglDataA &
y, const mglDataA &
z, const mglDataA &
c, const char *
sch=""
, const char *
opt=""
)
¶void
mgl_tile (HMGL
gr, HCDT
z, const char *
sch, const char *
opt)
¶void
mgl_tile_xy (HMGL
gr, HCDT
x, HCDT
y, HCDT
z, const char *
sch, const char *
opt)
¶void
mgl_tile_xyc (HMGL
gr, HCDT
x, HCDT
y, HCDT
z, HCDT
c, const char *
sch, const char *
opt)
¶The function draws horizontal tiles for surface specified parametrically {x[i,j], y[i,j], z[i,j]} and color it by matrix c[i,j] (c=z if c is not provided). If string sch contain style ‘x’ or ‘y’ then tiles will be oriented perpendicular to x- or y-axis. Such plot can be used as 3d generalization of step. See also surf, boxs, step, tiles. See Sample ‘tile’, for sample code and picture.
zdat ['sch'='']
¶xdat ydat zdat ['sch'='']
¶mglGraph
: void
Dens (const mglDataA &
z, const char *
sch=""
, const char *
opt=""
, mreal
zVal=NAN
)
¶mglGraph
: void
Dens (const mglDataA &
x, const mglDataA &
y, const mglDataA &
z, const char *
sch=""
, const char *
opt=""
, mreal
zVal=NAN
)
¶void
mgl_dens (HMGL
gr, HCDT
z, const char *
sch, const char *
opt)
¶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 equal to minimal z-axis value. 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 Sample ‘dens’, for sample code and picture.
vdat zdat ['sch'='']
¶vdat xdat ydat zdat ['sch'='']
¶mglGraph
: void
Cont (const mglDataA &
v, const mglDataA &
z, const char *
sch=""
, const char *
opt=""
)
¶mglGraph
: void
Cont (const mglDataA &
v, const mglDataA &
x, const mglDataA &
y, const mglDataA &
z, const char *
sch=""
, const char *
opt=""
)
¶void
mgl_cont_val (HMGL
gr, HCDT
v, HCDT
z, const char *
sch, const char *
opt)
¶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 equal to minimal z-axis value 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 Sample ‘cont’, for sample code and picture.
zdat ['sch'='']
¶xdat ydat zdat ['sch'='']
¶mglGraph
: void
Cont (const mglDataA &
z, const char *
sch=""
, const char *
opt=""
)
¶mglGraph
: void
Cont (const mglDataA &
x, const mglDataA &
y, const mglDataA &
z, const char *
sch=""
, const char *
opt=""
)
¶void
mgl_cont (HMGL
gr, HCDT
z, const char *
sch, const char *
opt)
¶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). If string sch contain symbol ‘.’ then only contours at levels with saddle points will be drawn.
val
adat xdat ydat zdat ['sch'='']
¶mglGraph
: void
ContGen (mreal
val, const mglDataA &
a, const mglDataA &
x, const mglDataA &
y, const mglDataA &
z, const char *
sch=""
, const char *
opt=""
)
¶void
mgl_cont_gen (HMGL
gr, mreal
val, HCDT
a, HCDT
x, HCDT
y, HCDT
z, const char *
sch, const char *
opt)
¶Draws contour lines for surface specified parametrically {x[i,j], y[i,j], z[i,j]} at a[i,j]=val. If string sch have symbol ‘t’ or ‘T’ then contour labels v[k] will be drawn below (or above) the contours.
vdat zdat ['sch'='']
¶vdat xdat ydat zdat ['sch'='']
¶mglGraph
: void
ContF (const mglDataA &
v, const mglDataA &
z, const char *
sch=""
, const char *
opt=""
)
¶mglGraph
: void
ContF (const mglDataA &
v, const mglDataA &
x, const mglDataA &
y, const mglDataA &
z, const char *
sch=""
, const char *
opt=""
)
¶void
mgl_contf_val (HMGL
gr, HCDT
v, HCDT
z, const char *
sch, const char *
opt)
¶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 equal to minimal z-axis value 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 Sample ‘contf’, for sample code and picture.
zdat ['sch'='']
¶xdat ydat zdat ['sch'='']
¶mglGraph
: void
ContF (const mglDataA &
z, const char *
sch=""
, const char *
opt=""
)
¶mglGraph
: void
ContF (const mglDataA &
x, const mglDataA &
y, const mglDataA &
z, const char *
sch=""
, const char *
opt=""
)
¶void
mgl_contf (HMGL
gr, HCDT
z, const char *
sch, const char *
opt)
¶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).
v1 v2
adat xdat ydat zdat ['sch'='']
¶mglGraph
: void
ContFGen (mreal
v1, mreal
v2, const mglDataA &
a, const mglDataA &
x, const mglDataA &
y, const mglDataA &
z, const char *
sch=""
, const char *
opt=""
)
¶void
mgl_contf_gen (HMGL
gr, mreal
v1, mreal
v2, HCDT
a, HCDT
x, HCDT
y, HCDT
z, const char *
sch, const char *
opt)
¶Draws solid (or filled) contour lines for surface specified parametrically {x[i,j], y[i,j], z[i,j]} between a[i,j]=v1 and a[i,j]=v2.
vdat zdat ['sch'='']
¶vdat xdat ydat zdat ['sch'='']
¶mglGraph
: void
ContD (const mglDataA &
v, const mglDataA &
z, const char *
sch=""
, const char *
opt=""
)
¶mglGraph
: void
ContD (const mglDataA &
v, const mglDataA &
x, const mglDataA &
y, const mglDataA &
z, const char *
sch=""
, const char *
opt=""
)
¶void
mgl_contd_val (HMGL
gr, HCDT
v, HCDT
z, const char *
sch, const char *
opt)
¶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 equal to minimal z-axis value 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 Sample ‘contd’, for sample code and picture.
zdat ['sch'='']
¶xdat ydat zdat ['sch'='']
¶mglGraph
: void
ContD (const mglDataA &
z, const char *
sch=""
, const char *
opt=""
)
¶mglGraph
: void
ContD (const mglDataA &
x, const mglDataA &
y, const mglDataA &
z, const char *
sch=""
, const char *
opt=""
)
¶void
mgl_contd (HMGL
gr, HCDT
z, const char *
sch, const char *
opt)
¶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).
vdat xdat ydat zdat adat ['sch'='']
¶mglGraph
: void
ContP (const mglDataA &
v, const mglDataA &
x, const mglDataA &
y, const mglDataA &
z, const mglDataA &
a, const char *
sch=""
, const char *
opt=""
)
¶void
mgl_contp_val (HMGL
gr, HCDT
v, HCDT
x, HCDT
y, HCDT
z, HCDT
a, const char *
sch, const char *
opt)
¶The function draws contour lines on surface specified parametrically {x[i,j], y[i,j], z[i,j]}. Contours are plotted for a[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. If string sch have symbol ‘f’ then solid contours will be drawn. See also cont, contf, surfc, cont[xyz]
.
xdat ydat zdat adat ['sch'='']
¶mglGraph
: void
ContP (const mglDataA &
x, const mglDataA &
y, const mglDataA &
z, const mglDataA &
a, const char *
sch=""
, const char *
opt=""
)
¶void
mgl_contp (HMGL
gr, HCDT
x, HCDT
y, HCDT
z, HCDT
a, 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).
vdat zdat ['sch'='']
¶vdat xdat ydat zdat ['sch'='']
¶mglGraph
: void
ContV (const mglDataA &
v, const mglDataA &
z, const char *
sch=""
, const char *
opt=""
)
¶mglGraph
: void
ContV (const mglDataA &
v, const mglDataA &
x, const mglDataA &
y, const mglDataA &
z, const char *
sch=""
, const char *
opt=""
)
¶void
mgl_contv_val (HMGL
gr, HCDT
v, HCDT
z, const char *
sch, const char *
opt)
¶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 equal to minimal z-axis value 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 Sample ‘contv’, for sample code and picture.
zdat ['sch'='']
¶xdat ydat zdat ['sch'='']
¶mglGraph
: void
ContV (const mglDataA &
z, const char *
sch=""
, const char *
opt=""
)
¶mglGraph
: void
ContV (const mglDataA &
x, const mglDataA &
y, const mglDataA &
z, const char *
sch=""
, const char *
opt=""
)
¶void
mgl_contv (HMGL
gr, HCDT
z, const char *
sch, const char *
opt)
¶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).
vdat zdat ['sch'='']
¶vdat xdat ydat zdat ['sch'='']
¶mglGraph
: void
Axial (const mglDataA &
v, const mglDataA &
z, const char *
sch=""
, const char *
opt=""
)
¶mglGraph
: void
Axial (const mglDataA &
v, const mglDataA &
x, const mglDataA &
y, const mglDataA &
z, const char *
sch=""
, const char *
opt=""
)
¶void
mgl_axial_val (HMGL
gr, HCDT
v, HCDT
z, const char *
sch, const char *
opt)
¶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 Sample ‘axial’, for sample code and picture.
zdat ['sch'='']
¶xdat ydat zdat ['sch'='']
¶mglGraph
: void
Axial (const mglDataA &
z, const char *
sch=""
, const char *
opt=""
, int
num=3
)
¶mglGraph
: void
Axial (const mglDataA &
x, const mglDataA &
y, const mglDataA &
z, const char *
sch=""
, const char *
opt=""
, int
num=3
)
¶void
mgl_axial (HMGL
gr, HCDT
z, const char *
sch, const char *
opt)
¶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).
zdat ['sch'='']
¶xdat ydat zdat ['sch'='']
¶mglGraph
: void
Grid (const mglDataA &
z, const char *
sch=""
, const char *
opt=""
)
¶mglGraph
: void
Grid (const mglDataA &
x, const mglDataA &
y, const mglDataA &
z, const char *
sch=""
, const char *
opt=""
)
¶void
mgl_grid (HMGL
gr, HCDT
z, const char *
sch, const char *
opt)
¶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 equal to minimal z-axis value. See also dens, cont, contf, grid3, meshnum.