manpagez: man pages & more
info gnuplot
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.21.14.2 set datafile missing

The `set datafile missing` command allows you to tell `gnuplot` what character string is used in a data file to denote missing data. Exactly how this missing value will be treated depends on the using specifier of the `plot` or `splot` command.

Syntax:

 
      set datafile missing {"<string>"}
      show datafile missing
      unset datafile

Example:

 
      # Ignore entries containing IEEE NaN ("Not a Number") code
      set datafile missing "NaN"

Example:

 
      set datafile missing "?"
      set style data lines
      plot '-'
         1 10
         2 20
         3 ?
         4 40
         5 50
         e
      plot '-' using 1:2
         1 10
         2 20
         3 ?
         4 40
         5 50
         e
      plot '-' using 1:($2)
         1 10
         2 20
         3 ?
         4 40
         5 50
         e

The first `plot` will recognize only the first datum in the "3 ?" line. It will use the single-datum-on-a-line convention that the line number is "x" and the datum is "y", so the point will be plotted (in this case erroneously) at (2,3).

The second `plot` will correctly ignore the middle line. The plotted line will connect the points at (2,20) and (4,40).

The third `plot` will also correctly ignore the middle line, but the plotted line will not connect the points at (2,20) and (4,40).

There is no default character for `missing`, but in many cases any non-parsible string of characters found where a numerical value is expected will be treated as missing data.


© manpagez.com 2000-2025
Individual documents may contain additional copyright information.