14.10.2014 Views

gnuplot documentation

gnuplot documentation

gnuplot documentation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

70 SET-SHOW <strong>gnuplot</strong> 4.3 95<br />

70.14 Datafile<br />

The set datafile command options control interpretation of fields read from input data files by the<br />

plot, splot, and fit commands. Four such options are currently implemented.<br />

70.14.1 Set datafile fortran<br />

The set datafile fortran command enables a special check for values in the input file expressed as<br />

Fortran D or Q constants. This extra check slows down the input process, and should only be selected<br />

if you do in fact have datafiles containing Fortran D or Q constants. The option can be disabled again<br />

using unset datafile fortran.<br />

70.14.2 Set datafile missing<br />

The set datafile missing command allows you to tell <strong>gnuplot</strong> what character string is used in a data<br />

file to denote missing data. Exactly how this missing value will be treated depends on the using specifier<br />

of the plot or splot command.<br />

Syntax:<br />

set datafile missing {""}<br />

show datafile missing<br />

unset datafile<br />

Example:<br />

# Ignore entries containing IEEE NaN ("Not a Number") code<br />

set datafile missing "NaN"<br />

Example:<br />

set datafile missing "?"<br />

set style data lines<br />

plot ’-’<br />

1 10<br />

2 20<br />

3 ?<br />

4 40<br />

5 50<br />

e<br />

plot ’-’ using 1:2<br />

1 10<br />

2 20<br />

3 ?<br />

4 40<br />

5 50<br />

e<br />

plot ’-’ using 1:($2)<br />

1 10<br />

2 20<br />

3 ?<br />

4 40<br />

5 50<br />

e<br />

The first plot will recognize only the first datum in the "3 ?" line. It will use the single-datum-on-a-line<br />

convention that the line number is "x" and the datum is "y", so the point will be plotted (in this case<br />

erroneously) at (2,3).<br />

The second plot will correctly ignore the middle line. The plotted line will connect the points at (2,20)<br />

and (4,40).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!