gnuplot documentation
gnuplot documentation
gnuplot documentation
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
60 PLOT <strong>gnuplot</strong> 4.3 71<br />
# Gnu population in Antarctica since 1965<br />
1965 103<br />
1970 55<br />
1975 34<br />
1980 24<br />
1985 10<br />
60.2.5 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 />
index ’’ selects the data set with name ’’. Names are assigned to data sets in comment<br />
lines. The comment character and leading white space are removed from the comment line. If the<br />
resulting line starts with , the following data set is now named and can be selected.<br />
Example:<br />
plot ’file’ index ’Population’<br />
Please note that every comment that starts with will name the following data set. To avoid<br />
problems use a naming scheme like e.g. ’== Popolation ==’ or ’[Population]’.<br />
60.2.6 Smooth<br />
<strong>gnuplot</strong> includes a few general-purpose routines for interpolation and approximation of data; these<br />
are grouped under the smooth option. More sophisticated data processing may be performed by<br />
preprocessing the data externally or by using fit with an appropriate model.<br />
Syntax:<br />
smooth {unique | frequency | csplines | acsplines | bezier | sbezier}<br />
unique and frequency plot the data after making them monotonic. Each of the other routines uses<br />
the data to determine the coefficients of a continuous curve between the endpoints of the data. This<br />
curve is then plotted in the same manner as a function, that is, by finding its value at uniform intervals<br />
along the abscissa (see set samples (p. 129)) and connecting these points with straight line segments<br />
(if a line style is chosen).<br />
If autoscale is in effect, the ranges will be computed such that the plotted curve lies within the borders<br />
of the graph.<br />
If autoscale is not in effect, and the smooth option is either acspline or cspline, the sampling of the<br />
generated curve is done across the intersection of the x range covered by the input data and the fixed<br />
abscissa range as defined by set xrange.<br />
If too few points are available to allow the selected option to be applied, an error message is produced.<br />
The minimum number is one for unique and frequency, four for acsplines, and three for the others.<br />
The smooth options have no effect on function plots.