Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #201
| From | geep <geep@boursomail.com> |
|---|---|
| Newsgroups | comp.graphics.apps.gnuplot |
| Subject | Re: How to re-use the same output device/xterm each time gnuplot is invoked? |
| Date | 2011-04-01 15:09 +0000 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <in4prt$fs8$1@speranza.aioe.org> (permalink) |
| References | <in3j2j$og8$1@speranza.aioe.org> |
On Thu, 31 Mar 2011 21:07:46 -0700, Nasser M. Abbasi wrote:
> Hello;
>
> I am on linux, and I am very new to gnuplot, but I am trying to see if I
> can use it to make animation by calling it from Fortran program.
>
> The setup is like this:
>
>
> PROGRAM ----> gnuplot
>
> Where the actual call inside the program follow this logic
>
> LOOP
> -- update data, create new data.txt file on disk from this data
> CALL system('gnuplot batch.plt') -- call to make new plot
> END LOOP
>
> and batch.plt would start as
>
> #!/usr/bin/gnuplot -persist
> ... load data from data.txt and make plot # EOF
>
> The above works OK, but the problem is that each call makes a NEW xterm
> on top of the earlier one.
>
> So if I run the loop for 10 time, I end up with 10 plots on 10 different
> windows. If I remove -persist, then each plot window disappear, and new
> one is created, etc... and one is not able to see the animation.
>
> What I want is to reuse the same window, basically erase the previous
> plot (if any) on it, and make a new one on the same plot/window, to
> obtain the effect of animation.
>
> But I am not sure how to do this. I need some kind of window ID/device
> ID, to tell gnuplot to reuse that when starting a new process, since
> each call to gnuplot from the program will create a new process.
>
> So, basically I want the gnuplot script to do something like
>
> --------------------
> IF window_ID allready exist, then send all output to it else create a
> new window and assign it window_ID make plot to window_ID
> ---------------------
>
> Any ideas how to do this, or even if it possible?
>
> thanks
> --Nasser
Hi,
I haven't tried it myself, but gnuplot can make animated gifs - take a
looke here: http://www.gnuplot.info/faq/faq.html
Maybe it will be helpful.
Cheers,
Peter
Back to comp.graphics.apps.gnuplot | Previous | Next — Previous in thread | Next in thread | Find similar
How to re-use the same output device/xterm each time gnuplot is invoked? "Nasser M. Abbasi" <nma@12000.org> - 2011-03-31 21:07 -0700
Re: How to re-use the same output device/xterm each time gnuplot is invoked? geep <geep@boursomail.com> - 2011-04-01 15:09 +0000
Re: How to re-use the same output device/xterm each time gnuplot is invoked? sfeam <sfeam@users.sourceforge.net> - 2011-04-01 10:54 -0700
Re: How to re-use the same output device/xterm each time gnuplot is invoked? James Waldby <not@valid.invalid> - 2011-04-01 16:41 +0000
csiph-web