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 SPLOT <strong>gnuplot</strong> 4.3 151<br />
Single blank records separate datablocks in a splot datafile; splot treats datablocks as the equivalent<br />
of function y-isolines. No line will join points separated by a blank record. If all datablocks contain the<br />
same number of points, <strong>gnuplot</strong> will draw cross-isolines between datablocks, connecting corresponding<br />
points. This is termed "grid data", and is required for drawing a surface, for contouring (set contour)<br />
and hidden-line removal (set hidden3d). See also splot grid data (p. 153).<br />
It is no longer necessary to specify parametric mode for three-column splots.<br />
72.1.1 Binary matrix<br />
Gnuplot can read matrix binary files by use of the option binary appearing without keyword qualifications<br />
unique to general binary, i.e., array, record, format, or filetype. Other general binary keywords<br />
for translation should also apply to matrix binary. (See binary general (p. 66) for more details.)<br />
In previous versions, <strong>gnuplot</strong> dynamically detected binary data files. It is now necessary to specify the<br />
keyword binary directly after the filename.<br />
Single precision floats are stored in a binary file as follows:<br />
... <br />
... <br />
... <br />
: : : : ... :<br />
which are converted into triplets:<br />
<br />
<br />
<br />
: : :<br />
<br />
<br />
<br />
: : :<br />
These triplets are then converted into <strong>gnuplot</strong> iso-curves and then <strong>gnuplot</strong> proceeds in the usual<br />
manner to do the rest of the plotting.<br />
A collection of matrix and vector manipulation routines (in C) is provided in binary.c. The routine to<br />
write binary data is<br />
int fwrite_matrix(file,m,nrl,nrl,ncl,nch,row_title,column_title)<br />
An example of using these routines is provided in the file bf test.c, which generates binary files for the<br />
demo file demo/binary.dem.<br />
The index keyword is not supported, since the file format allows only one surface per file. The every<br />
and using filters are supported. using operates as if the data were read in the above triplet form.<br />
See also binary general (p. 66) and<br />
Binary File Splot Demo.<br />
72.1.2 Example datafile<br />
A simple example of plotting a 3D data file is<br />
splot ’datafile.dat’<br />
where the file "datafile.dat" might contain:<br />
# The valley of the Gnu.<br />
0 0 10<br />
0 1 10<br />
0 2 10