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

  • Thread starter alice06
  • Start date
Hi all
I badly need some help....

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

Code:
gnuplot> plot "output1.txt" using 1:2 with lines, \
plot "output1.txt" using 1:3 with lines
BUT now I have many data files,

Code:
output1.txt, output2.txt, output3.txt, ....,....... ,output1000.txt
I need to plot each one of them in gnuplot, and save them respectively in

Code:
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
 

Want to reply to this thread?

"How to plot and save many data files in GNUPLOT, inside a loop in a SHELL SCRIPT" You must log in or register to reply here.

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving
Top