[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: gnuplot: plotting each point in different color

Florian Kulzer wrote:

One more thing worth mentioning is that the subroutine trick can also be
used to loop over the columns of a dataset (using the "column" command),
for example if you have a data file with one common x-axis and 100
y-datasets (columns) that you want plot in the same graph. (Or can the
plot command do this automatically these days?)

You might be looking for 'using'. Here is an example:
gnuplot>  plot  "force.dat" using 1:2 title 'Column', \
                "force.dat" using 1:3 title 'Beam'

If you have three cols in a force.dat file.
This is shamelessly copied from Section 3.2 here:

BTW, Gnuplot has come a long way from earlier versions (2.x, 3.x?). Recent versions (> 4.0) are rich with features and have a nifty GUI to manipulate 3-D data or surface plots with the mouse. The developers have done some pretty neat stuff over there!


Reply to: