This function produces two-dimensional plots with errorbars. Many different combinations of arguments are possible. The simplest form is
errorbar (y, ey)where the first argument is taken as the set of y coordinates and the second argument ey is taken as the errors of the y values. x coordinates are taken to be the indices of the elements, starting with 1.
If more than two arguments are given, they are interpreted as
errorbar (x, y, ..., fmt, ...)where after x and y there can be up to four error parameters such as ey, ex, ly, uy etc., depending on the plot type. Any number of argument sets may appear, as long as they are separated with a format string fmt.
If y is a matrix, x and error parameters must also be matrices having same dimensions. The columns of y are plotted versus the corresponding columns of x and errorbars are drawn from the corresponding columns of error parameters.
If fmt is missing, yerrorbars ("~") plot style is assumed.
If the fmt argument is supplied, it is interpreted as in normal plots. In addition the following plot styles are supported by errorbar:
- ‘~’
- Set yerrorbars plot style (default).
- ‘>’
- Set xerrorbars plot style.
- ‘~>’
- Set xyerrorbars plot style.
- ‘#’
- Set boxes plot style.
- ‘#~’
- Set boxerrorbars plot style.
- ‘#~>’
- Set boxxyerrorbars plot style.
Examples:
errorbar (x, y, ex, ">")produces an xerrorbar plot of y versus x with x errorbars drawn from x-ex to x+ex.
errorbar (x, y1, ey, "~", x, y2, ly, uy)produces yerrorbar plots with y1 and y2 versus x. Errorbars for y1 are drawn from y1-ey to y1+ey, errorbars for y2 from y2-ly to y2+uy.
errorbar (x, y, lx, ux, ly, uy, "~>")produces an xyerrorbar plot of y versus x in which x errorbars are drawn from x-lx to x+ux and y errorbars from y-ly to y+uy.