PDA

View Full Version : How to plot and save many data files in GNUPLOT, inside a loop in a SHELL SCRIPT


alice06
Oct25-10, 06:42 AM
Hi all
I badly need some help....

I plot a file output1.txt in the following way ::

gnuplot> plot "output1.txt" using 1:2 with lines, \
plot "output1.txt" using 1:3 with lines

BUT now I have many data files,

output1.txt, output2.txt, output3.txt, ....,....... ,output1000.txt

I need to plot each one of them in gnuplot, and save them respectively in

graph1.jpeg, graph2.jpeg, graph3.jpeg, ............, graph1000.jpeg


It is very cumbersome if I plot and save 1 file at a time.

Is there an easy way, using loops in a Shell script that can PLOT and SAVE them

Please kindly help
Regards
Alice