|
From: pemilti <mic...@lt...> - 2008-09-04 06:35:37
|
hello,
it would be very nice if someone can help me. I have some datas in a file
with consecutive numbering.
All files are in the same directory. Is it possible to plot them all
automatically without a script like that i have copy. I think like a
programm with a loop for ... do... ? I have more than 250 data files which I
have to plot.
set grid
set title 'Data Netz Aus'
set xlabel 'Zeit [s]'
set terminal gif tiny size 1024,768
set y2label
set y2tics
set output 'Ausgabe_00.gif'
plot 'NetzAus_0.dat' using 1:2 with lines axes x1y1 title "Strom [A]", \
'NetzAus_0.dat' using 1:3 with lines axes x1y1 title "ISQSOLL_VF [A]",
\
'NetzAus_0.dat' using 1:4 with lines axes x1y2 title "UZK [V]", \
'NetzAus_0.dat' using 1:5 with lines axes x1y2 title "Frequenz [Hz]"
set output 'Ausgabe_01.gif'
plot 'NetzAus_1.dat' using 1:2 with lines axes x1y1 title "Strom [A]", \
'NetzAus_1.dat' using 1:3 with lines axes x1y1 title "ISQSOLL_VF [A]",
\
'NetzAus_1.dat' using 1:4 with lines axes x1y2 title "UZK [V]", \
'NetzAus_1.dat' using 1:5 with lines axes x1y2 title "Frequenz [Hz]"
set output 'Ausgabe_02.gif'
plot 'NetzAus_2.dat' using 1:2 with lines axes x1y1 title "Strom [A]", \
'NetzAus_2.dat' using 1:3 with lines axes x1y1 title "ISQSOLL_VF [A]",
\
'NetzAus_2.dat' using 1:4 with lines axes x1y2 title "UZK [V]", \
'NetzAus_2.dat' using 1:5 with lines axes x1y2 title "Frequenz [Hz]"
....
...
..
Thanks for your answers
pemilti
--
View this message in context: http://www.nabble.com/read-and-plot-a-lot-of-files-with-consecutive-numbering-tp19272692p19272692.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|
|
From: Thomas S. <t.s...@fz...> - 2008-09-02 15:51:41
|
simulate the loop with the 'reread' command see help string and help reread (or http://www.gnuplot.info/docs/node151.html and http://www.gnuplot.info/docs/node69.html ) -- View this message in context: http://www.nabble.com/read-and-plot-a-lot-of-files-with-consecutive-numbering-tp19272692p19272801.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: pemilti <mic...@lt...> - 2008-09-03 12:07:06
|
Thomas Sefzick wrote: > > simulate the loop with the 'reread' command > > see > help string > and > help reread > > (or > http://www.gnuplot.info/docs/node151.html > and > http://www.gnuplot.info/docs/node69.html > ) > > OK, but how I can read the files with consecutive numbering, example: file1.dat, file2.dat,... and write the output to out1.gif, out2.gif,..? I've got a file whose name is used to generate other filenames with consecutive numbering. I want to do this like this schema: counter = counter + 1; set output 'out_'counter'.gif' plot 'NetzAus_'.counter'.dat' using 1:2 with lines axes x1y1 title "Strom [A]" if (counter<= counterMax) reread -- View this message in context: http://www.nabble.com/read-and-plot-a-lot-of-files-with-consecutive-numbering-tp19272692p19287920.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: Thomas S. <t.s...@fz...> - 2008-09-03 13:39:15
|
> OK, but how I can read the files with consecutive numbering, > example: file1.dat, file2.dat,... > and write the output to out1.gif, out2.gif,..? > I've got a file whose name is used to generate other filenames > with consecutive numbering. > > I want to do this like this schema: > counter = counter + 1; > set output 'out_'counter'.gif' > plot 'NetzAus_'.counter'.dat' using 1:2 with lines axes x1y1 title "Strom > [A]" > if (counter<= counterMax) reread you need a start script and another script for the loop: start.plt: set grid set title 'Data Netz Aus' set xlabel 'Zeit [s]' set terminal gif tiny size 1024,768 set y2label set y2tics counter = 0 counterMax = 100 load 'loop.plt' loop.plt: counter = counter + 1; set output 'out_'.counter.'.gif' plot 'NetzAus_'.counter.'.dat' using 1:2 with lines axes x1y1 title "Strom [A]" if (counter<= counterMax) reread and then you start the whole thing at the gnuplot command prompt: load 'start.plt' -- View this message in context: http://www.nabble.com/read-and-plot-a-lot-of-files-with-consecutive-numbering-tp19272692p19289384.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: pemilti <mic...@lt...> - 2008-09-03 14:01:23
|
Thomas Sefzick wrote: > >> OK, but how I can read the files with consecutive numbering, >> example: file1.dat, file2.dat,... >> and write the output to out1.gif, out2.gif,..? >> I've got a file whose name is used to generate other filenames >> with consecutive numbering. >> >> I want to do this like this schema: >> counter = counter + 1; >> set output 'out_'counter'.gif' >> plot 'NetzAus_'.counter'.dat' using 1:2 with lines axes x1y1 title "Strom >> [A]" >> if (counter<= counterMax) reread > > you need a start script and another script for the loop: > > start.plt: > > set grid > set title 'Data Netz Aus' > set xlabel 'Zeit [s]' > set terminal gif tiny size 1024,768 > set y2label > set y2tics > counter = 0 > counterMax = 100 > load 'loop.plt' > > loop.plt: > > counter = counter + 1; > set output 'out_'.counter.'.gif' > plot 'NetzAus_'.counter.'.dat' using 1:2 with lines axes x1y1 title "Strom > [A]" > if (counter<= counterMax) reread > > and then you start the whole thing at the gnuplot > command prompt: > > load 'start.plt' > > @ Thomas Sefzick Thanks for your great and fast help. It works very nice. :jumping: @All Please note: If you want to start with 0 you have to set counter to -1. -- View this message in context: http://www.nabble.com/read-and-plot-a-lot-of-files-with-consecutive-numbering-tp19272692p19289877.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |