Plotting two-dimensional data files
A D V E R T I S E M E N T
Please read the section on
data files
for the format for data files mentioned here.
The syntax of the plot command for plotting a
two-dimensional set of data is as follows:
plot {ranges}
"datafile" {using
data-format} {title
"title text"} {style}
If several plots are to be plotted, subsequent data plots (or functions) can be
specified, separated by commas. The optional sections are shown with braces.
Note that only one set of ranges can be specified, as the subsequent plots (or
data plots) use the same range. By default a data file's first and second
columns are used as the X and Y values, respectively. A data file with two
columns of data can be plotted using the following command:
plot "file.txt"
Error bar plots
For plots with error bars, the data file used also needs the information for
the error bars. If only a third column is given, that column is used for the
delta values of Y. If the third and fourth columns are specified, the columns
are used for the low value for Y and high value for Y, respectively. In order to
create plots with error bars, you will need to plot the data twice. Once to plot
the data, and a second time to plot the error bars.
plot "fileerr.txt"
with lines, "fileerr.txt" with errorbars
|