Farnsworth
Farnsworth

Reputation: 125

How to use GNUPlot with dataset that is single-row separated with a comma

How can I use GNUplot with a single row dataset separated with commas and no spaces?

Example:

36.9,39.4,40.7,45.9,48.4,49.3,

Upvotes: 2

Views: 246

Answers (1)

Ethan
Ethan

Reputation: 15093

$ROWDATA << EOD
 36.9,39.4,40.7,45.9,48.4,49.3,
EOD

set datafile separator comma
row = 0
set yrange [0:50]
plot $ROWDATA matrix using 1:0 every :::row::row with points pt 7

Yes this is a really obscure command. Note that the program will interpret the trailing comma as an empty field and issue a non-fatal error message about missing matrix elements.

enter image description here

Upvotes: 4

Related Questions