14.10.2014 Views

gnuplot documentation

gnuplot documentation

gnuplot documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

The third plot will also correctly ignore the middle line, but the plotted line will not connect the points<br />

at (2,20) and (4,40).<br />

There is no default character for missing, but in many cases any non-parsible string of characters found<br />

where a numerical value is expected will be treated as missing data.<br />

70.14.3 Set datafile separator<br />

The command set datafile separator "" tells <strong>gnuplot</strong> that data fields in subsequent input<br />

files are separated by rather than by whitespace. The most common use is to read in csv<br />

(comma-separated value) files written by spreadsheet or database programs. By default data fields are<br />

separated by whitespace.<br />

Syntax:<br />

Examples:<br />

set datafile separator {"" | whitespace}<br />

# Input file contains tab-separated fields<br />

set datafile separator "\t"<br />

# Input file contains comma-separated values fields<br />

set datafile separator ","<br />

70.14.4 Set datafile commentschars<br />

The set datafile commentschars command allows you to tell <strong>gnuplot</strong> what characters are used in<br />

a data file to denote comments. Gnuplot will ignore rest of the line behind the specified characters if<br />

either of them is the first non-blank character on the line.<br />

Syntax:<br />

set datafile commentschars {""}<br />

show datafile commentschars<br />

unset commentschars<br />

Default value of the string is "#!" on VMS and "#" otherwise.<br />

Then, the following line in a data file is completely ignored<br />

# 1 2 3 4<br />

but the following<br />

1 # 3 4<br />

produces rather unexpected plot unless<br />

set datafile missing ’#’<br />

is specified as well.<br />

Example:<br />

set datafile commentschars "#!%"<br />

70.14.5 Set datafile binary<br />

The set datafile binary command is used to set the defaults when reading binary data files. The<br />

syntax matches precisely that used for commands plot and splot. See binary (p. 66) for details about<br />

.<br />

Syntax:

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

Saved successfully!

Ooh no, something went wrong!