You can use placeholder codes in a plot's title lines, axis labels, legend, and notations that will be replaced with the corresponding numeric or text values when the plot is drawn. Codes that are replaced with numbers may also be used in equations with the Y=f(X) and similar commands. Codes may be specific to a particular data set or curve, or to the entire plot. All codes are preceded by a dollar sign ($). Placeholder codes and the result of their use is shown below.
Code |
Replaced with |
$AREA |
Area under a curve (XY plots only). Calculated using the trapezoidal rule:
|
$FILETITLE |
Text appearing in the window caption of the document, normally the filename of the document if it has been saved. |
$LENGTH |
Dimensionless length of a curve (XY plots only).
|
$MEAN |
Average amplitude. For 2D data, the average Y value. For 3D data, the average Z value. |
$NEDGE |
Number of exterior edges (3D plots only) |
$NPTS |
Number of data points |
$NTRI |
Number of triangles (randomly-spaced 3D points only) |
$RMS |
Root-Mean-Square (RMS) of the data amplitudes (Y values for 1D and 2D plots, Z values for 3D data). The RMS is defined by:
|
$SUMX |
Sum of the X values for a curve. (XY plots only) |
$SUMY |
Sum of the Y values for a curve. (XY plots only). Barring overflow errors, should be equal to $MEAN * $NPTS for a given curve. |
$STDEV |
Standard deviation in the data amplitudes. For 2D data, standard deviation in the Y values. For 3D data, the standard deviation in the Z values.
For MS Excel users, this returns the same value as Excel's STDEVA function. |
$XMIN |
Minimum X value. Ignored for box-and-whisker plots and dot graphs. |
$XMAX |
Maximum X value. Ignored for box-and-whisker plots and dot graphs |
$XRANGE |
Maximum X value minus the minimum X value. |
$YMIN |
Minimum Y value. |
$YMAX |
Maximum Y value. |
$YRANGE |
Maximum Y value minus the minimum Y value. |
$YFIRST |
Y value of the first point in a curve (XY plots only). |
$YLAST |
Y value of the last point in a curve (XY plots only). |
$ZMIN |
Minimum Z value. Ignored for 1D and 2D plots. |
$ZMAX |
Maximum Z value. Ignored for 1D and 2D plots. |
$ZRANGE |
Maximum Z value minus the minimum Z value. |
$=(<equation>) |
Result of evaluating <equation>. For example, “$=(sqrt(5))” will be replaced with “2.23607”. Note that the equation must be enclosed by parentheses. Other text shortcuts that are replaced by a number (i.e. any shortcut other than $FILETITLE) may be used in an equation, as in “$=($STDEV(1)/$MEAN(1))”. For trigonometric functions, the argument is always assumed to be in degrees. This differs a bit from Y=f(X) and other commands that allow a choice between degrees and radians. For more information on equation syntax, operators, and supported functions see the description of the Y=f(X) command. |
Placeholder text IS case-sensitive, e.g. $Xmax will be ignored.
All of the placeholders may include a numeric argument specifying which data set the placeholder refers to. That numeric argument must be enclosed with parentheses. A 0 argument means that the value for the entire plot (rather than a specific data set) should be used. If the data set argument is omitted, then a context-sensitive decision is made by DPlot about whether the placeholder refers to a specific data set or to the entire plot. For example,
$YMAX when used in a title line or notation will be replaced with the maximum Y value for all data sets. If used in a legend entry, then it will be replaced with the maximum Y value of the data set (curve) associated with that legend entry. To use the maximum Y value for all data sets in a legend entry, then, you must use $YMAX(0) rather than $YMAX.
$YMAX(5) will always be replaced with the maximum Y value from the 5th data set, regardless of where this placeholder is used.
Area ($AREA), mean ($MEAN) and standard deviation ($STDEV) values for multiple data sets are never calculated. If you use a 0 argument for these values then the placeholder will be replaced with the area, mean or standard deviation for the first data set.
Page url: http://www.dplot.com/help/index.htm?helpid_text_shortcuts.htm