GNUPlot Manual
GNUPlot Manual
GNUPlot Manual
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
156 gnuplot 4.0 38 SPLOT<br />
In previous versions, gnuplot 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 gnuplot iso-curves and then gnuplot 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. See<br />
also<br />
Binary File Splot Demo.<br />
38.1.2 Example datafile<br />
A simple example of plotting a 3-d 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<br />
1 0 10<br />
1 1 5<br />
1 2 10<br />
2 0 10<br />
2 1 1<br />
2 2 10<br />
3 0 10<br />
3 1 0<br />
3 2 10