2
votes

I have a long datafile (450 columns), which is like:

x y z x y z x y z...
1 2 4 2 
4 3 5 5
7 4 6 8
10 5 7 11

Three columns are related and I would like to plot in one diagram 1 vs 2, 4 vs 5, 7 vs 8,...

And in a second diagram 1 vs 3, 4 vs 6, 7 vs 9,...

y and z are variables calculated dependent on x.

I tried, e.g.,

plot for [col=2:10:3] "file.txt" using 1:col with lines

This plots the y values but only vs the first column for x. Is there maybe a possibility to write in the using command to plot vs every nth column?

Thanks for help!

1

1 Answers

1
votes

You can use

plot for [c=1:10:3] "file.txt" using c:(column(c+1))

and for the second plot

plot for [c=1:10:3] "file.txt" using c:(column(c+2))