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.
72 <strong>gnuplot</strong> 4.3 60 PLOT<br />
60.2.6.1 Acsplines The acsplines option approximates the data with a "natural smoothing spline".<br />
After the data are made monotonic in x (see smooth unique (p. 72)), a curve is piecewise constructed<br />
from segments of cubic polynomials whose coefficients are found by the weighting the data points; the<br />
weights are taken from the third column in the data file. That default can be modified by the third<br />
entry in the using list, e.g.,<br />
plot ’data-file’ using 1:2:(1.0) smooth acsplines<br />
Qualitatively, the absolute magnitude of the weights determines the number of segments used to construct<br />
the curve. If the weights are large, the effect of each datum is large and the curve approaches that<br />
produced by connecting consecutive points with natural cubic splines. If the weights are small, the<br />
curve is composed of fewer segments and thus is smoother; the limiting case is the single segment<br />
produced by a weighted linear least squares fit to all the data. The smoothing weight can be expressed<br />
in terms of errors as a statistical weight for a point divided by a "smoothing factor" for the curve so<br />
that (standard) errors in the file can be used as smoothing weights.<br />
Example:<br />
sw(x,S)=1/(x*x*S)<br />
plot ’data_file’ using 1:2:(sw($3,100)) smooth acsplines<br />
60.2.6.2 Bezier The bezier option approximates the data with a Bezier curve of degree n (the<br />
number of data points) that connects the endpoints.<br />
60.2.6.3 Csplines The csplines option connects consecutive points by natural cubic splines after<br />
rendering the data monotonic (see smooth unique (p. 72)).<br />
60.2.6.4 Sbezier The sbezier option first renders the data monotonic (unique) and then applies<br />
the bezier algorithm.<br />
60.2.6.5 Unique The unique option makes the data monotonic in x; points with the same x-value<br />
are replaced by a single point having the average y-value. The resulting points are then connected by<br />
straight line segments.<br />
demos<br />
60.2.6.6 Frequency The frequency option makes the data monotonic in x; points with the same x-<br />
value are replaced by a single point having the summed y-values. The resulting points are then connected<br />
by straight line segments.<br />
60.2.7 Special-filenames<br />
There are three filenames that have a special meaning: ’ ’, ’-’, and ’+’.<br />
The empty filename ’ ’ tells <strong>gnuplot</strong> to re-use the previous input file in the same plot command. So to<br />
plot two columns from the same input file:<br />
plot ’filename’ using 1:2, ’’ using 1:3<br />
The special filename ’+’ is a mechanism to allow the full range of using specifiers and plot styles with<br />
in-line functions. Normally a function plot can only have a single y (or z) value associated with each<br />
sampled point. The pseudo-file ’+’ treats the sampled points as columns 1 (plot) or 1 and 2 (splot), and<br />
allows additional column values to be specified via a using specification, just as for a true input file.<br />
Example:<br />
plot ’+’ using ($1):(sin($1)):(sin($1)**2) with filledcurves