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

8.9 1D plotting (MGL)

These commands perform plotting of 1D data. 1D means that data depended from only 1 parameter like parametric curve {x(i),y(i),z(i)}, i=1...n. There are 5 generally different types of data representations: simple line plot (plot), line plot with filling under it (area), stairs plot (step), bar plot (bars, barh) and vertical lines (stem). Each type of plotting has similar interface. Most of plotting type has similar interface. There are 3D version and two 2D versions. One of last requires single array. The parameters of line and marks are specified by the string argument. If the string parameter is NULL then solid line with color from palette is used (see section Line styles). Also there are some special 1d plots having slightly different interface: surface of curve rotation (torus), chart (chart) and error boxes (error), marks with variable size (mark), tubes (tube) and so on. See section 1D plot sample, for sample code and picture.

The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension must be equal for all arrays xdat.nx=ydat.nx=zdat.nx. If array xdat is not specified then its an automatic array is used with values equidistantly distributed along x. If array zdat is not specified then zdat[i] = zval is used (the default is at the bottom of the bounding box). String stl specifies the color and style of line and marks (see section Line styles). By default (stl='') solid line with color from palette is used (see section Line styles).

MGL command: plot ydat ['stl'='' zval=nan]
MGL command: plot xdat ydat ['stl'='' zval=nan]
MGL command: plot xdat ydat zdat ['stl'='']

Draws continuous lines between points {xdat[i], ydat[i], zdat[i]}. See also area, step, stem, tube, mark, error, belt, tens. See section Plot sample, for sample code and picture.

MGL command: radar adat ['stl'='' r=-1]

Draws radar chart which is continuous lines between points located on an radial lines (like plot in Polar coordinates). The plots are drawn for each row if one of the data is the matrix. Parameter r set the additional shift of data (i.e. the data adat+r is used instead of adat). If r<0 then r=max(0, -min(adat). String pen specifies the color and style of line and marks (see section Line styles). By default (stl="") solid line with color from palette is used (see section Line styles). If pen containt ‘#’ symbol then "grid" (radial lines and circle for r) is drawn See also plot. See section Radar sample, for sample code and picture.

MGL command: tens ydat cdat ['stl'='' zval=nan]
MGL command: tens xdat ydat cdat ['stl'='' zval=nan]
MGL command: tens xdat ydat zdat cdat ['stl'='']

Draws continuous lines between points {xdat[i], ydat[i], zdat[i]} with color defined by cdat[i] (look like tension plot). See also plot, mesh, fall. See section Tens sample, for sample code and picture.

MGL command: area ydat ['stl'='' zval=nan]
MGL command: area xdat ydat ['stl'='' zval=nan]
MGL command: area xdat ydat zdat ['stl'='']

Draws continuous lines between points {xdat[i], ydat[i], zdat[i]} and fills it down to axis (to axis plane in 3D). You can use gradient filling if number of specified colors is equal to 2*number of curves. If string contain symbol ‘a’ then lines are drawn one above another (like summation). See also plot, bars, stem, region. See section Area sample, for sample code and picture.

MGL command: region fdat gdat ['stl'='' inside=off]
MGL command: region xdat fdat gdat ['stl'='' inside=off]

Fills area between curves {xdat[i], fdat[i]} and {xdat[i], gdat[i]}. Parameter inside=off set to fill are with y1<y<y2 else the area with y2<y<y1 will be also filled. You can use gradient filling if number of specified colors is equal to 2*number of curves. See also area, bars, stem. See section Region sample, for sample code and picture.

MGL command: stem ydat ['stl'='' zval=nan]
MGL command: stem xdat ydat ['stl'='' zval=nan]
MGL command: stem xdat ydat zdat ['stl'='']

Draws vertical lines from points {xdat[i], ydat[i], zdat[i]} to axis (to axis plane in 3D). See also area, bars, plot, mark. See section Stem sample, for sample code and picture.

MGL command: bars ydat ['stl'='' zval=nan]
MGL command: bars xdat ydat ['stl'='' zval=nan]
MGL command: bars xdat ydat zdat ['stl'='']

Draws vertical bars from points {xdat[i], ydat[i], zdat[i]} to axis (to axis plane in 3D). If style contain symbol ‘a’ then lines are drawn one above another. If string contain symbol ‘f’ then waterfall chart is drawn for determining the cumulative effect of sequentially introduced positive or negative values. You can different colors for positive and negative values if number of specified colors is equal to 2*number of curves. See also barh, area, stem, chart. See section Bars sample, for sample code and picture.

MGL command: barh vdat ['stl'='' zval=nan]
MGL command: barh ydat vdat ['stl'='' zval=nan]

Draws horizontal bars from points {xdat[i], ydat[i], zdat[i]} to y-axis. If array ydat is not specified then its an automatic array is used with values equidistantly distributed along y. Marks at data points are not drawn. If style contain symbol ‘a’ then lines are drawn one above another. If string contain symbol ‘f’ then waterfall chart is drawn for determining the cumulative effect of sequentially introduced positive or negative values. You can different colors for positive and negative values if number of specified colors is equal to 2*number of curves. See also bars. See section Barh sample, for sample code and picture.

MGL command: chart adat ['col'='']

The command draws colored stripes (boxes) for data in array adat. The number of stripes is equal to the number of rows in adat (equal to a.ny). The color of each next stripe is cyclically changed from colors specified in string col or in palette. Spaces in colors denote transparent “color”, i.e. if col contain space(s) then corresponding stripe(s) are not drawn. The stripe width is proportional to value of element in a. Chart is plotted only for data with non-negative elements. If string col have symbol ‘#’ then black border lines are drawn. The most nice form the chart have in 3d (after rotation of coordinates) or in cylindrical coordinates (becomes so called Pie chart). See section Chart sample, for sample code and picture.

MGL command: step ydat ['stl'='' zval=nan]
MGL command: step xdat ydat ['stl'='' zval=nan]
MGL command: step xdat ydat zdat ['stl'='']

Draws continuous stairs for points {xdat[i], ydat[i], zdat[i]}. See also plot, stem, tile, boxs. See section Step sample, for sample code and picture.

MGL command: torus zdat ['stl'='']
MGL command: torus rdat zdat ['stl'='']

Draws surface which is result of curve {rdat[i], zdat[i], zdat[i]} rotation around axialdir axis. If array rdat is not specified then its an automatic array is used with values equidistantly distributed along x. See also plot, axial. See section Torus sample, for sample code and picture.

MGL command: tube ydat rdat ['stl'='' zval=nan]
MGL command: tube ydat rval ['stl'='' zval=nan]
MGL command: tube xdat ydat rdat ['stl'='' zval=nan]
MGL command: tube xdat ydat rval ['stl'='' zval=nan]
MGL command: tube xdat ydat zdat rdat ['stl'='']
MGL command: tube xdat ydat zdat rval ['stl'='']

Draws tube with variable radius rdat[i] (or rval) at points {xdat[i], ydat[i], zdat[i]}. See also plot. See section Tube sample, for sample code and picture.

MGL command: mark ydat rdat ['stl'='' zval=nan]
MGL command: mark xdat ydat rdat ['stl'='' zval=nan]
MGL command: mark xdat ydat zdat rdat ['stl'='']

Draws marks with size rdat[i]*marksize at points {xdat[i], ydat[i], zdat[i]}. See also plot, textmark, stem, error. See section Mark sample, for sample code and picture.

MGL command: textmark ydat 'txt' ['stl'='' zval=nan]
MGL command: textmark ydat rdat 'txt' ['stl'='' zval=nan]
MGL command: textmark xdat ydat rdat 'txt' ['stl'='' zval=nan]
MGL command: textmark xdat ydat zdat rdat 'txt' ['stl'='']

Draws string txt as marks with size rdat[i]*marksize at points {xdat[i], ydat[i], zdat[i]}. If array rdat is not specified then rdat[i] = 1. See also plot, mark, stem. See section Error sample, for sample code and picture.

MGL command: error ydat yerr ['stl'='' zval=nan]
MGL command: error xdat ydat yerr ['stl'='' zval=nan]
MGL command: error xdat ydat xerr yerr ['stl'='' zval=nan]

Draws error boxes {xerr[i], yerr[i]} at points {xdat[i], ydat[i], zval}. See also plot. See section TextMark sample, for sample code and picture.

MGL command: boxplot adat ['stl'='' zval=nan]
MGL command: boxplot xdat adat ['stl'='' zval=nan]

Draws boxplot (also known as a box-and-whisker diagram) at points xdat in plane z=zval (by default is at the bottom of the bounding box). This is five-number summaries of data <em>adat</em> (minimum, lower quartile (Q1), median (Q2), upper quartile (Q3) and maximum) along second (j-th) direction. See also plot, error, bars. See section BoxPlot sample, for sample code and picture.


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