1.36 plot

plot [item <id>] [{<range>}] ( '<filename>' | <function> )
     [axes <axes>] [every <expression> {:<expression>}]
     [index <value>] [select <expression>]
     [title <string>] [using <expression> {:<expression>}]
     [with {<option>}]

The plot command is used to produce graphs. The following simple example would plot the sine function:

plot sin(x)

Ranges for the axes of a graph can be specified by placing them in square brackets before the name of the function to be plotted. An example of this syntax would be:

plot [-pi:pi] sin(x)

which would plot the function $\sin (x)$ between $-\pi $ and $\pi $.

Datafiles may also be plotted as well as functions, in which case the filename of the datafile to be plotted should be enclosed in either single or double quotation marks. An example of this syntax would be:

plot 'data.dat' with points

which would plot data from the file data.dat. Section 3.8 provides further details of the format that input datafiles should take and how PyXPlot may be directed to plot only certain portions of datafiles.

Multiple datasets can be plotted on a single graph by specifying them in a comma-separated list, as in the example:

plot sin(x) with colour blue, cos(x) with linetype 2