I\'m trying to produce a plot with two lines using data taken from stdin. I have a file \"test.csv\":
0,1.1,2
1,2,3
2,6,4
4,4.6,5
5,5,6
I\
Gnuplot can read from stdin, but for each plot statement, a new data set is required. The following works fine:
cat test.csv | gnuplot -p -e "set datafile separator ','; plot '-' using 1:2 w l"
The error appears as soon as you append the second plot command with , '' using 1:3. For this you need to send the data again as the first data set isn't stored interally for reuse. So for you two plot commands, the following snippet works fine:
echo 'e' | cat test.csv - test.csv | gnuplot -p -e "set datafile separator ','; plot '-' using 1:2 w l, '' using 1:3 w l"
That writes the data file twice, separated by an e which indicates the end of the data for the first plot command.