I need to use gnuplot to quickly glance whether a sequence of data follow a
reasonable pattern, thus I need to modify a figure in the datafile name to
achieve it. For example,
p 'a1000_phi_24' u (f($1,width)):(1) smooth freq with
boxes,'a1000_phi_24.hist' u 1:2 w p,'a1000_phi_24.hist2' u 1:2 w p
where 24 will be replaced by 25, 26 ,...
I am wondering whether I can do something like the following:
define a string as
s=24,
and issue a command as
p 'a1000_phi_'+str(s) u (f($1,width)):(1) smooth freq with
boxes,'a1000_phi_'+str(s)+'.hist' u 1:2 w p,'a1000_phi_'+str(s)+'.hist2' u
1:2 w p
just like in python. Then I can change s=24 to s=25, etc, thus easily plot
according to the rest data files.
Thanks for your hints!
John L.
|