The basic workhorse command of PyXPlot is the plot command, which is used to produce all plots. The following simple example would plot the function :
plot sin(x)
It is also possible to plot data stored in files on disk. The following would plot data from a file data.dat, taking the -co-ordinate of each point from the first column of the data file, and the
-co-ordinate from the second. The data file is assumed to be in plain text format1, with columns separated by whitespace and/or commas2:
plot 'data.dat'
Several items can be plotted on the same graph by separating them by commas:
plot 'data.dat', sin(x), cos(x)
It is possible to define one’s own variables and functions, and then plot them:
a = 2 b = 1 c = 1.5 f(x) = a*(x**2) + b*x + c plot f(x)
To unset a variable or function once it has been set, the following syntax should be used:
a = f(x) =
Footnotes