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

Viewed 99

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,

1 Answers
$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

Related