Next: Three-Dimensional Plotting, Previous: Two-Dimensional Plotting, Up: Plotting

— Function File: **bar** (`x, y`)

Given two vectors of x-y data,

`bar`

produces a bar graph.If only one argument is given, it is taken as a vector of y-values and the x coordinates are taken to be the indices of the elements.

If two output arguments are specified, the data are generated but not plotted. For example,

bar (x, y);and

[xb, yb] = bar (x, y); plot (xb, yb);are equivalent.

— Function File: **contour** (`z, n`)

— Function File:**contour** (`x, y, z, n`)

— Function File:

Make a contour plot of the three-dimensional surface described by

z. Someone needs to improve`gnuplot`

's contour routines before this will be very useful.

— Function File: **hist** (`y, x, norm`)

Produce histogram counts or plots.

With one vector input argument, plot a histogram of the values with 10 bins. The range of the histogram bins is determined by the range of the data.

Given a second scalar argument, use that as the number of bins.

Given a second vector argument, use that as the centers of the bins, with the width of the bins determined from the adjacent values in the vector.

If third argument is provided, the histogram is normalised such that the sum of the bars is equal to

norm.Extreme values are lumped in the first and last bins.

With two output arguments, produce the values

nnandxxsuch that`bar (`

xx`,`

nn`)`

will plot the histogram.

— Function File: **loglog** (`args`)

Make a two-dimensional plot using log scales for both axes. See the description of

`plot`

for a description of the arguments that`loglog`

will accept.

— Function File: **polar** (`theta, rho, fmt`)

Make a two-dimensional plot given polar the coordinates

thetaandrho.The optional third argument specifies the line type.

— Function File: **semilogx** (`args`)

Make a two-dimensional plot using a log scale for the

xaxis. See the description of`plot`

for a description of the arguments that`semilogx`

will accept.

— Function File: **semilogy** (`args`)

Make a two-dimensional plot using a log scale for the

yaxis. See the description of`plot`

for a description of the arguments that`semilogy`

will accept.

— Function File: **stairs** (`x, y`)

Given two vectors of x-y data, bar produces a `stairstep' plot.

If only one argument is given, it is taken as a vector of y-values and the x coordinates are taken to be the indices of the elements.

If two output arguments are specified, the data are generated but not plotted. For example,

stairs (x, y);and

[xs, ys] = stairs (x, y); plot (xs, ys);are equivalent.

— Function File: **errorbar** (`args`)

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

ycoordinates and the second argumenteyis taken as the errors of theyvalues.xcoordinates 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

xandythere can be up to four error parameters such asey,ex,ly,uyetc., depending on the plot type. Any number of argument sets may appear, as long as they are separated with a format stringfmt.If

yis a matrix,xand error parameters must also be matrices having same dimensions. The columns ofyare plotted versus the corresponding columns ofxand errorbars are drawn from the corresponding columns of error parameters.If

fmtis missing, yerrorbars ("~") plot style is assumed. If thefmtargument is supplied, it is interpreted as in normal plots (See __pltopt__). 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, ">")xerrorbar plot of

yversusxwithxerrorbars drawn fromx-extox+ex.errorbar(x,y1,ey, "~",x,y2,ly,uy)Two yerrorbar plots with

y1andy2versusx. Errorbars fory1are drawn fromy1-eytoy1+ey, errorbars fory2fromy2-lytoy2+uy.errorbar(x,y,lx,ux,ly,uy, "~>")xyerrorbar plot of

yversusxwherexerrorbars are drawn fromx-lxtox+uxandyerrorbars fromy-lytoy+uy.

— Function File: **loglogerr** (`args`)

This function produces two-dimensional plots on double logarithm axis with errorbars. Many different combinations of arguments are possible. The most used form is

loglogerr (x,y,ey,fmt)which produces a double logarithm plot of

yversusxwith errors in they-scale defined byeyand the plot format defined byfmt. See errorbar for available formats and additional information.

— Function File: **semilogxerr** (`args`)

This function produces two-dimensional plots on a semilogarithm axis with errorbars. Many different combinations of arguments are possible. The most used form is

semilogxerr (x,y,ey,fmt)which produces a semi-logarithm plot of

yversusxwith errors in they-scale defined byeyand the plot format defined byfmt. See errorbar for available formats and additional information.

— Function File: **semilogyerr** (`args`)

This function produces two-dimensional plots on a semilogarithm axis with errorbars. Many different combinations of arguments are possible. The most used form is

semilogyerr (x,y,ey,fmt)which produces a semi-logarithm plot of

yversusxwith errors in they-scale defined byeyand the plot format defined byfmt. See errorbar for available formats and additional information.