GNUPlot Manual
GNUPlot Manual
GNUPlot Manual
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
40 gnuplot 4.0 28 PLOT<br />
In the discussion a "point" is a datum defined by a single record in the file; "block" here will mean the<br />
same thing as "datablock" (see glossary (p. 23)).<br />
Syntax:<br />
plot ’file’ every {}<br />
{:{}<br />
{:{}<br />
{:{}<br />
{:{}<br />
{:}}}}}<br />
The data points to be plotted are selected according to a loop from to <br />
with increment and the blocks according to a loop from to <br />
with increment .<br />
The first datum in each block is numbered ’0’, as is the first block in the file.<br />
Note that records containing unplottable information are counted.<br />
Any of the numbers can be omitted; the increments default to unity, the start values to the first point<br />
or block, and the end values to the last point or block. If every is not specified, all points in all lines<br />
are plotted.<br />
Examples:<br />
every :::3::3<br />
every :::::9<br />
every 2:2<br />
every ::5::15<br />
# selects just the fourth block (’0’ is first)<br />
# selects the first 10 blocks<br />
# selects every other point in every other block<br />
# selects points 5 through 15 in each block<br />
See simple plot demos (simple.dem) , Non-parametric splot demos , and Parametric splot<br />
demos .<br />
28.1.2 Example datafile<br />
This example plots the data in the file "population.dat" and a theoretical curve:<br />
pop(x) = 103*exp((1965-x)/10)<br />
plot [1960:1990] ’population.dat’, pop(x)<br />
The file "population.dat" might contain:<br />
# Gnu population in Antarctica since 1965<br />
1965 103<br />
1970 55<br />
1975 34<br />
1980 24<br />
1985 10<br />
28.1.3 Index<br />
The index keyword allows only some of the data sets in a multi-data-set file to be plotted.<br />
Syntax:<br />
plot ’file’ index {{:}:}<br />
Data sets are separated by pairs of blank records. index selects only set ; index :<br />
selects sets in the range to ; and index :: selects indices , +,<br />
+2, etc., but stopping at . Following C indexing, the index 0 is assigned to the first data<br />
set in the file. Specifying too large an index results in an error message. If index is not specified, all<br />
sets are plotted as a single data set.<br />
Example:<br />
plot ’file’ index 4:5<br />
splot with indices demo.