have a look at the 'reread' command. an example:
################################
i = 1
n = 1000
set terminal jpeg
load "loop.plt"
################################
"loop.plt" contains:
################################
filename = "output".i.".txt"
plotfile = "graph".i.".jpg"
print filename." ".plotfile
set output plotfile
plot filename using 1:2, "" using 1:3
set output
i=i+1
if (i <= n) reread
################################
alice06 wrote:
>
> Hi all
>
> Please I 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 or something, that can PLOT and SAVE
> them
>
> Please kindly help
> Regards
> Alice
>
--
View this message in context: http://old.nabble.com/How-to-plot-and-save-many-data-files-in-GNUPLOT%2C-inside-a-loop-in-a-SHELL-SCRIPT-tp30047281p30050667.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|