|
From: wayne0308 <wok...@gm...> - 2008-01-18 14:17:07
|
Hi there, I was hoping someone can help me with this. I'll tell you a little about what I'm doing and then what I'm trying to do. I've programmed a numerical simulation in C, which outputs a data file on each iteration (time step). On average I could end up with 10's of .dat files, I've used a simple naming convention "data000.dat, data001.dat and so on. What I'm trying to do is to get GNUPLOT to create a plot of each of these .dat files . So lets say I have 200 data file, then I want to plot 200 graphs, one for each. The only thing that will change from graph to graph is the data plotted within. Do I need to write a script to do this? If so, does anyone know of tutorials I can use, or if anyone has any examples of how I can implement this. I know what I'm trying to do but I'm afraid I haven't a clue how to do it :-) Any help you can give will be much appreciated, Wayne. -- View this message in context: http://www.nabble.com/Creating-multiple-plots-tp14949801p14949801.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: <as...@gm...> - 2008-01-18 14:39:17
|
On Jan 18, 2008 12:17 PM, wayne0308 <wok...@gm...> wrote:
>
> Hi there,
>
> I was hoping someone can help me with this. I'll tell you a little about
> what I'm doing and then what I'm trying to do.
>
> I've programmed a numerical simulation in C, which outputs a data file on
> each iteration (time step). On average I could end up with 10's of .dat
> files, I've used a simple naming convention "data000.dat, data001.dat and=
so
> on.
>
> What I'm trying to do is to get GNUPLOT to create a plot of each of these
> .dat files . So lets say I have 200 data file, then I want to plot 200
> graphs, one for each. The only thing that will change from graph to graph=
is
> the data plotted within.
>
> Do I need to write a script to do this?
Hi Wayne. I'm working with gnuplot 4.3. I'm not sure if it works with
a previous version of gnuplot, but you can check that. Here is the
script:
file(n) =3D sprintf("yourdirectory/data%03.dat",n)
plot for [i=3D0:199] file(i) u 1:2 (or whatever!)
I hope it helps. Cheers,
Hern=E1n
>
> If so, does anyone know of tutorials I can use, or if anyone has any
> examples of how I can implement this.
>
> I know what I'm trying to do but I'm afraid I haven't a clue how to do it
> :-)
>
> Any help you can give will be much appreciated,
>
> Wayne.
> --
> View this message in context: http://www.nabble.com/Creating-multiple-plo=
ts-tp14949801p14949801.html
> Sent from the Gnuplot - User mailing list archive at Nabble.com.
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Gnuplot-info mailing list
> Gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>
--=20
---------------------------------------------
Mg. Hern=E1n Gonzalo Asorey
Instituto Balseiro - CAB
(8400) San Carlos de Bariloche
R=EDo Negro - Rep. Argentina
---------------------------------------------
cabtep5.cnea.gov.ar/~asoreyh/
|
|
From: Micha W. <mw...@gm...> - 2008-01-19 08:28:33
|
Hernán Gonzalo Asorey wrote:
> file(n) = sprintf("yourdirectory/data%03.dat",n)
> plot for [i=0:199] file(i) u 1:2 (or whatever!)
Is the for loop documented somewhere? I couldn't find it.
Thanks,
Micha
|
|
From: <as...@gm...> - 2008-01-22 19:13:02
|
On Jan 19, 2008 6:29 AM, Micha Wiedenmann <mw...@gm...> wrote:
>
> Hern=E1n Gonzalo Asorey wrote:
> > file(n) =3D sprintf("yourdirectory/data%03.dat",n)
> > plot for [i=3D0:199] file(i) u 1:2 (or whatever!)
>
> Is the for loop documented somewhere? I couldn't find it.
Hi Micha, sorry for the lag. See:
gnuplot> help iteration
Or take a look to gnuplot documentation under iteration (page 78)
Cheers,
Hernan
>
> Thanks,
> Micha
>
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Gnuplot-info mailing list
> Gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>
--=20
---------------------------------------------
Mg. Hern=E1n Gonzalo Asorey
Instituto Balseiro - CAB
(8400) San Carlos de Bariloche
R=EDo Negro - Rep. Argentina
---------------------------------------------
cabtep5.cnea.gov.ar/~asoreyh/
|