OcelotIIX schrieb:
> Hi,
> I've got a numerical program which produces a whole heap of data, with a
> single time column, and an intedeterminate number of y value columns. The
> number of y columns is determined by a parsed file, and so I'd like to know
> if there is a way for gnuplot to plot all the y columns against the x
> column, without having to specify explicitly the number of y columns in the
> gnuplot script, or resorting to modifying the gnuplot script depending on
> the program's output.
> Thanks for any suggestions
How about you write a script that determines the number of columns lets
call it col-count and then do something like
plot for [i=1:`col-count`] 'data.dat' u 1:i
(see help iteration)
col-count could look like: "awk 'END { print NF }' data.dat" or
something more advanced.
Hope that helps,
Micha
|