Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #199

How to re-use the same output device/xterm each time gnuplot is invoked?

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.news-service.com!94.75.214.39.MISMATCH!aioe.org!.POSTED!not-for-mail
From "Nasser M. Abbasi" <nma@12000.org>
Newsgroups comp.graphics.apps.gnuplot
Subject How to re-use the same output device/xterm each time gnuplot is invoked?
Date Thu, 31 Mar 2011 21:07:46 -0700
Organization Aioe.org NNTP Server
Lines 52
Message-ID <in3j2j$og8$1@speranza.aioe.org> (permalink)
Reply-To nma@12000.org
NNTP-Posting-Host tUYQ4Ty9mMw9Pdc8TJRFQA.user.speranza.aioe.org
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Complaints-To abuse@aioe.org
User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9
X-Notice Filtered by postfilter v. 0.8.2
Xref x330-a1.tempe.blueboxinc.net comp.graphics.apps.gnuplot:199

Show key headers only | View raw


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

Back to comp.graphics.apps.gnuplot | Previous | NextNext in thread | Find similar


Thread

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