PLOTERR Procedure

Standard Library procedure that plots data points with accompanying symmetrical error bars.

Usage

PLOTERR[, x], y, error 

Input Parameters

x — (optional) A real vector containing the x-coordinates of the data to plot. If not present, x is assumed to be a vector of the same size as y and to have integer values beginning at 0 and continuing to the size of y – 1.

y — A real vector containing the y-coordinates of the data to plot.

error — A vector containing the error bar values of every point to be plotted.

Keywords

Psym — The plotting symbol to use. If not specified, the default is 7 (the symbol “X”). Psym corresponds to the system variable !Psym. See Graphics and Plotting Keywords for a complete description of the Psym graphics keyword.

Type — Specifies the type of plot to produce. Valid values are:

0 — X Linear, Y Linear (the default)

1 — X Linear, Y Log

2 — X Log, Y Linear

3 — X Log, Y Log

Discussion

PLOTERR produces a plot of y versus x, with error bars drawn from
yerror to y + error.

Example

Assume that vector y contains the data values to be plotted, and that error is the vector containing the error bar values. The commands to plot the data points with accompanying symmetrical error bars are:

y = [2, 1, 3, 3, 1]
error = [0.0, 0.5, 1.0, 0.5, 0.0]
PLOTERR, y, error, Psym=4

To overplot a line through the error bar, enter the following command:

OPLOT, y

This produces the plot shown in Symmetrical Error Bars with a Line Overplot. In this example, PLOTERR was first used to plot data points with their accompanying symmetrical error bars, and then OPLOT was used to overplot a line through the error bar.

Symmetrical Error Bars with a Line Overplot

See Also

ERRPLOT, OPLOT, OPLOTERR, PLOT