Next: , Previous: , Up: MathGL core   [Contents][Index]


5.16 Other plotting

These functions perform miscellaneous plotting. There is unstructured data points plots (Dots), surface reconstruction (Crust), surfaces on the triangular or quadrangular mesh (TriPlot, TriCont, QuadPlot), textual formula plotting (Plots by formula), data plots at edges (Dens[XYZ], Cont[XYZ], ContF[XYZ]). 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. Parameters of color scheme are specified by the string argument. See Color scheme.

MGL command: densx dat ['sch'='' sval=nan]
MGL command: densy dat ['sch'='' sval=nan]
MGL command: densz dat ['sch'='' sval=nan]
Method on mglGraph: void DensX (const mglDataA &a, const char *stl="", mreal sVal=NAN, const char *opt="")
Method on mglGraph: void DensY (const mglDataA &a, const char *stl="", mreal sVal=NAN, const char *opt="")
Method on mglGraph: void DensZ (const mglDataA &a, const char *stl="", mreal sVal=NAN, const char *opt="")
C function: void mgl_dens_x (HMGL gr, HCDT a, const char *stl, mreal sVal, const char *opt)
C function: void mgl_dens_y (HMGL gr, HCDT a, const char *stl, mreal sVal, const char *opt)
C function: void mgl_dens_z (HMGL gr, HCDT a, const char *stl, mreal sVal, const char *opt)

These plotting functions draw density plot in x, y, or z plain. If a is a tensor (3-dimensional data) then interpolation to a given sVal is performed. These functions are useful for creating projections of the 3D data array to the bounding box. See also ContXYZ, ContFXYZ, dens, Data manipulation. See dens_xyz sample, for sample code and picture.

MGL command: contx dat ['sch'='' sval=nan]
MGL command: conty dat ['sch'='' sval=nan]
MGL command: contz dat ['sch'='' sval=nan]
Method on mglGraph: void ContX (const mglDataA &a, const char *stl="", mreal sVal=NAN, const char *opt="")
Method on mglGraph: void ContY (const mglDataA &a, const char *stl="", mreal sVal=NAN, const char *opt="")
Method on mglGraph: void ContZ (const mglDataA &a, const char *stl="", mreal sVal=NAN, const char *opt="")
C function: void mgl_cont_x (HMGL gr, HCDT a, const char *stl, mreal sVal, const char *opt)
C function: void mgl_cont_y (HMGL gr, HCDT a, const char *stl, mreal sVal, const char *opt)
C function: void mgl_cont_z (HMGL gr, HCDT a, const char *stl, mreal sVal, const char *opt)

These plotting functions draw contour lines in x, y, or z plain. If a is a tensor (3-dimensional data) then interpolation to a given sVal is performed. These functions are useful for creating projections of the 3D data array to the bounding box. Option value set the number of contours. See also ContFXYZ, DensXYZ, cont, Data manipulation. See cont_xyz sample, for sample code and picture.

Method on mglGraph: void ContX (const mglDataA &v, const mglDataA &a, const char *stl="", mreal sVal=NAN, const char *opt="")
Method on mglGraph: void ContY (const mglDataA &v, const mglDataA &a, const char *stl="", mreal sVal=NAN, const char *opt="")
Method on mglGraph: void ContZ (const mglDataA &v, const mglDataA &a, const char *stl="", mreal sVal=NAN, const char *opt="")
C function: void mgl_cont_x_val (HMGL gr, HCDT v, HCDT a, const char *stl, mreal sVal, const char *opt)
C function: void mgl_cont_y_val (HMGL gr, HCDT v, HCDT a, const char *stl, mreal sVal, const char *opt)
C function: void mgl_cont_z_val (HMGL gr, HCDT v, HCDT a, const char *stl, mreal sVal, const char *opt)

The same as previous with manual contour levels.

MGL command: contfx dat ['sch'='' sval=nan]
MGL command: contfy dat ['sch'='' sval=nan]
MGL command: contfz dat ['sch'='' sval=nan]
Method on mglGraph: void ContFX (const mglDataA &a, const char *stl="", mreal sVal=NAN, const char *opt="")
Method on mglGraph: void ContFY (const mglDataA &a, const char *stl="", mreal sVal=NAN, const char *opt="")
Method on mglGraph: void ContFZ (const mglDataA &a, const char *stl="", mreal sVal=NAN, const char *opt="")
C function: void mgl_contf_x (HMGL gr, HCDT a, const char *stl, mreal sVal, const char *opt)
C function: void mgl_contf_y (HMGL gr, HCDT a, const char *stl, mreal sVal, const char *opt)
C function: void mgl_contf_z (HMGL gr, HCDT a, const char *stl, mreal sVal, const char *opt)

These plotting functions draw solid contours in x, y, or z plain. If a is a tensor (3-dimensional data) then interpolation to a given sVal is performed. These functions are useful for creating projections of the 3D data array to the bounding box. Option value set the number of contours. See also ContFXYZ, DensXYZ, cont, Data manipulation. See contf_xyz sample, for sample code and picture.

Method on mglGraph: void ContFX (const mglDataA &v, const mglDataA &a, const char *stl="", mreal sVal=NAN, const char *opt="")
Method on mglGraph: void ContFY (const mglDataA &v, const mglDataA &a, const char *stl="", mreal sVal=NAN, const char *opt="")
Method on mglGraph: void ContFZ (const mglDataA &v, const mglDataA &a, const char *stl="", mreal sVal=NAN, const char *opt="")
C function: void mgl_contf_x_val (HMGL gr, HCDT v, HCDT a, const char *stl, mreal sVal, const char *opt)
C function: void mgl_contf_y_val (HMGL gr, HCDT v, HCDT a, const char *stl, mreal sVal, const char *opt)
C function: void mgl_contf_z_val (HMGL gr, HCDT v, HCDT a, const char *stl, mreal sVal, const char *opt)

The same as previous with manual contour levels.

MGL command: fplot 'y(x)' ['pen'='']
Method on mglGraph: void FPlot (const char *eqY, const char *pen="", const char *opt="")
C function: void mgl_fplot (HMGL gr, const char *eqY, const char *pen, const char *opt)

Draws command function ‘y(x)’ at plane z equal to minimal z-axis value, where ‘x’ variable is changed in xrange. You do not need to create the data arrays to plot it. Option value set initial number of points. See also plot.

MGL command: fplot 'x(t)' 'y(t)' 'z(t)' ['pen'='']
Method on mglGraph: void FPlot (const char *eqX, const char *eqY, const char *eqZ, const char *pen, const char *opt="")
C function: void mgl_fplot_xyz (HMGL gr, const char *eqX, const char *eqY, const char *eqZ, const char *pen, const char *opt)

Draws command parametrical curve {‘x(t)’, ‘y(t)’, ‘z(t)’} where ‘t’ variable is changed in range [0, 1]. You do not need to create the data arrays to plot it. Option value set number of points. See also plot.

MGL command: fsurf 'z(x,y)' ['sch'='']
Method on mglGraph: void FSurf (const char *eqZ, const char *sch="", const char *opt="");
C function: void mgl_fsurf (HMGL gr, const char *eqZ, const char *sch, const char *opt);

Draws command surface for function ‘z(x,y)’ where ‘x’, ‘y’ variable are changed in xrange, yrange. You do not need to create the data arrays to plot it. Option value set number of points. See also surf.

MGL command: fsurf 'x(u,v)' 'y(u,v)' 'z(u,v)' ['sch'='']
Method on mglGraph: void FSurf (const char *eqX, const char *eqY, const char *eqZ, const char *sch="", const char *opt="")
C function: void mgl_fsurf_xyz (HMGL gr, const char *eqX, const char *eqY, const char *eqZ, const char *sch, const char *opt)

Draws command parametrical surface {‘x(u,v)’, ‘y(u,v)’, ‘z(u,v)’} where ‘u’, ‘v’ variable are changed in range [0, 1]. You do not need to create the data arrays to plot it. Option value set number of points. See also surf.

MGL command: triplot idat xdat ydat ['sch'='']
MGL command: triplot idat xdat ydat zdat ['sch'='']
MGL command: triplot idat xdat ydat zdat cdat ['sch'='']
Method on mglGraph: void TriPlot (const mglDataA &id, const mglDataA &x, const mglDataA &y, const char *sch="", const char *opt="")
Method on mglGraph: void TriPlot (const mglDataA &id, const mglDataA &x, const mglDataA &y, const mglDataA &z, const mglDataA &c, const char *sch="", const char *opt="")
Method on mglGraph: void TriPlot (const mglDataA &id, const mglDataA &x, const mglDataA &y, const mglDataA &z, const char *sch="", const char *opt="")
C function: void mgl_triplot_xy (HMGL gr, HCDT id, HCDT x, HCDT y, const char *sch, const char *opt)
C function: void mgl_triplot_xyz (HMGL gr, HCDT id, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
C function: void mgl_triplot_xyzc (HMGL gr, HCDT id, HCDT x, HCDT y, HCDT z, HCDT c, const char *sch, const char *opt)

The function draws the surface of triangles. Triangle vertexes are set by indexes id of data points {x[i], y[i], z[i]}. String sch sets the color scheme. If string contain ‘#’ then wire plot is produced. First dimensions of id must be 3 or greater. Arrays x, y, z must have equal sizes. Parameter c set the colors of triangles (if id.ny=c.nx) or colors of vertexes (if x.nx=c.nx). See also dots, crust, quadplot, triangulation. See triplot sample, for sample code and picture.

MGL command: tricont vdat idat xdat ydat zdat cdat ['sch'='']
MGL command: tricont vdat idat xdat ydat zdat ['sch'='']
MGL command: tricont idat xdat ydat zdat ['sch'='']
Method on mglGraph: void TriCont (const mglDataA &id, const mglDataA &x, const mglDataA &y, const mglDataA &z, const mglDataA &c, const char *sch="", const char *opt="")
Method on mglGraph: void TriCont (const mglDataA &id, const mglDataA &x, const mglDataA &y, const mglDataA &z, const char *sch="", const char *opt="")
Method on mglGraph: void TriContV (const mglDataA &v, const mglDataA &id, const mglDataA &x, const mglDataA &y, const mglDataA &z, const mglDataA &c, const char *sch="", const char *opt="")
Method on mglGraph: void TriContV (const mglDataA &v, const mglDataA &id, const mglDataA &x, const mglDataA &y, const mglDataA &z, const char *sch="", const char *opt="")
C function: void mgl_tricont_xyzc (HMGL gr, HCDT id, HCDT x, HCDT y, HCDT z, HCDT c, const char *sch, const char *opt)
C function: void mgl_tricont_xyz (HMGL gr, HCDT id, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
C function: void mgl_tricont_xyzcv (HMGL gr, HCDT v, HCDT id, HCDT x, HCDT y, HCDT z, HCDT c, const char *sch, const char *opt)
C function: void mgl_tricont_xyzv (HMGL gr, HCDT v, HCDT id, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)

The function draws contour lines for surface of triangles at z=v[k] (or at z equal to minimal z-axis value if sch contain symbol ‘_’). Triangle vertexes are set by indexes id of data points {x[i], y[i], z[i]}. Contours are plotted for z[i,j]=v[k] where v[k] are values of data array v. If v is absent then arrays of option value elements equidistantly distributed in color range is used. String sch sets the color scheme. Array c (if specified) is used for contour coloring. First dimensions of id must be 3 or greater. Arrays x, y, z must have equal sizes. Parameter c set the colors of triangles (if id.ny=c.nx) or colors of vertexes (if x.nx=c.nx). See also triplot, cont, triangulation.

MGL command: quadplot idat xdat ydat ['sch'='']
MGL command: quadplot idat xdat ydat zdat ['sch'='']
MGL command: quadplot idat xdat ydat zdat cdat ['sch'='']
Method on mglGraph: void QuadPlot (const mglDataA &id, const mglDataA &x, const mglDataA &y, const char *sch="", const char *opt="")
Method on mglGraph: void QuadPlot (const mglDataA &id, const mglDataA &x, const mglDataA &y, const mglDataA &z, const mglDataA &c, const char *sch="", const char *opt="")
Method on mglGraph: void QuadPlot (const mglDataA &id, const mglDataA &x, const mglDataA &y, const mglDataA &z, const char *sch="", const char *opt="")
C function: void mgl_quadplot_xy (HMGL gr, HCDT id, HCDT x, HCDT y, const char *sch, const char *opt)
C function: void mgl_quadplot_xyz (HMGL gr, HCDT id, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
C function: void mgl_quadplot_xyzc (HMGL gr, HCDT id, HCDT x, HCDT y, HCDT z, HCDT c, const char *sch, const char *opt)

The function draws the surface of quadrangles. Quadrangles vertexes are set by indexes id of data points {x[i], y[i], z[i]}. String sch sets the color scheme. If string contain ‘#’ then wire plot is produced. First dimensions of id must be 4 or greater. Arrays x, y, z must have equal sizes. Parameter c set the colors of quadrangles (if id.ny=c.nx) or colors of vertexes (if x.nx=c.nx). See also triplot. See triplot sample, for sample code and picture.

MGL command: dots xdat ydat zdat ['sch'='']
MGL command: dots xdat ydat zdat adat ['sch'='']
Method on mglGraph: void Dots (const mglDataA &x, const mglDataA &y, const mglDataA &z, const char *sch="", const char *opt="")
Method on mglGraph: void Dots (const mglDataA &x, const mglDataA &y, const mglDataA &z, const mglDataA &a, const char *sch="", const char *opt="")
Method on mglGraph: void Dots (const mglDataA &x, const mglDataA &y, const mglDataA &z, const mglDataA &c, const mglDataA &a, const char *sch="", const char *opt="")
C function: void mgl_dots (HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
C function: void mgl_dots_a (HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, const char *opt)
C function: void mgl_dots_ca (HMGL gr, HCDT x, HCDT y, HCDT z, HCDT c, HCDT a, const char *sch, const char *opt)

The function draws the arbitrary placed points {x[i], y[i], z[i]}. String sch sets the color scheme and kind of marks. If arrays c, a are specified then they define colors and transparencies of dots. You can use tens plot with style ‘ .’ to draw non-transparent dots with specified colors. Arrays x, y, z, a must have equal sizes. See also crust, tens, mark, plot. See dots sample, for sample code and picture.

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

The function reconstruct and draws the surface for arbitrary placed points {x[i], y[i], z[i]}. String sch sets the color scheme. If string contain ‘#’ then wire plot is produced. Arrays x, y, z must have equal sizes. See also dots, triplot.


Next: , Previous: , Up: MathGL core   [Contents][Index]