Syntax:
plot '<file_name>' {binary} {index <index list>} \ {every <every list>} {thru <thru list>} {using <using list>}
The modifiers binary, index, every, thru, and using are discussed separately. In brief, index selects which data sets in a multi-data-set file are to be plotted, every selects which lines within a single data set are to be plotted, using determines how the columns within a single line are to be interpreted, thru is a special case of using, and binary is a flag for splot indicating that the file is binary.
Data files should contain one data point per line. Lines beginning with # (or ! on VMS) will be treated as comments and ignored. For plots, each data point represents an (x,y) pair. For splots, each point is an (x,y,z) triple. For plots with error bars (see set style errorbars), each data point is (x,y,ydelta), (x,y,ylow,yhigh), (x,y,xdelta), (x,y,xlow,xhigh), or (x,y,xlow,xhigh,ylow,yhigh). In all cases, the numbers on each line of a data file must be separated by white space (one or more blanks or tabs), unless a format specifier is provided by the using option. This white space divides each line into columns.
For plots, only one column (the y value) need be provided. For splots, provide either one column (z) or three (x,y,z). (It is no longer necessary to specify parametric mode for three-column splots.) If x (and y) are omitted, gnuplot provides integer values starting at 0.
In s/plot datafiles, blank lines (lines with no characters other than a line feed or carriage return) are significant—pairs of blank lines separate indexes (see plot datafile index). Data separated by double blank lines are treated as if they were in separate data files.
Single blank lines separate points in a plot, or isolines in a splot. No line will join points separated by a blank line in either a plot or splot. For splot, if all isolines (groups of contiguous points) are of equal length, gnuplot will draw cross-isolines in the opposite direction. This is termed ``grid data'', and is required for contouring (set contour) and hidden-line removal (set hidden3d).
If autoscaling has been enabled (set autoscale), the axes are automatically extended to include all datapoints, with a whole number of tic marks if tics are being drawn. This has two consequences: i) For splot, the corner of the surface may not coincide with the corner of the base. In this case, no vertical line is drawn. ii) When plotting data with the same x range on a dual-axis plot, the x co-ordinates may not coincide if the x2tics are not being drawn. This is because the x axis has been autoextended to a whole number of tics, but the x2 axis has not. The following example illustrates the problem:
reset; plot first, '-', second, '-' 1 1 19 19 e 1 1 19 19 e