Suppose I have the following file:
0 a b c
1 1 2 2
2 4 4 2
3 8 6 2
And I want to send it from the command line:
cat foofile | gnuplot -e 'file="/dev/stdin"' plot.p
With the following plotfile:
set key outside
plot for [col=2:4] file using 0:col with lines title columnheader
Now, suppose I would like to send GNUPlot an arbitrary columnar file with anywhere from 1:N columns, where N is arbitrary.
Since I am opening a pipe from within GNUPlot, it seems that I will not be able to read from it to determine the number of columns. How do I tell GNUPlot (in a clean way) to simply plot each column until there are none left to plot?