Use a single record of a file with multiple columns in gnuplot -
let's have following data stored in file 'file' (exciting!):
a_0 a_1 a_2 a_3 b_0 b_1 b_2 b_3 ...
and given function f. want draw several plots, 1 after other, each consisting of single point in (x,y) coordinates : a_2,f(a_2), b_2,f(b_2), etc.
i want use gnuplot-only solution (and think there must one, although can't find !).
i looking :
plot 'file' every ::0::0: using ($2):(f($2)) pause -1 plot 'file' every ::1::1: using ($2):(f($2)) ...
i seem doing complicated... !
the following works fine me. take data file file
:
0 1 2 3 4 5 6 7 8 9
and use:
f(x) = x**2 plot 'file' every ::0::0 using 3:(f($3))
that plots me single point @ (2, 4)
. automatic iteration use e.g.
stats 'file' using 0 nooutput [i=0:int(stats_records-1)] { plot 'file' every ::i::i using 3:(f($3)) pause -1 }
Comments
Post a Comment