help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scripts close plot windows automatically


From: Nicholas T
Subject: Re: scripts close plot windows automatically
Date: Thu, 20 Mar 2008 11:14:24 -0700

On Wed, Mar 20, 2008 at 12:20 PM, Przemek Klosowski <address@hidden> wrote:

Nicholas wants to keep the plot window open after octave exits, so
that the user must manually close it. Since gnuplot is a child of
octave, I think that octave would have to remain running---normally
child processes die when the parent goes away..

I think a better alternative is to use octave to write out a gnuplot
temp file, and then run gnuplot in a separate command.

I think running gnuplot independently of octave is the correct advice
in most cases where people want a behavior or appearance different
from the default octave/gnuplot; in my opinion the __gnuplot_set__
approach causes more longterm pain than it's worth, and is about as
convenient as simply writing out gnuplot commands:

     fprintf(FILE,"set axis ...")


Hi Przemek,

   I don't want to do gnuplot output because I'm using mesh(), which would require a nontrivial amount of gnuplot familiarization.

   Unfortunately, closerequestfcn isn't actually called when the window is closed, and all of the values that get() returns are the same after closing a window (__modified__ and __plot_stream__ change the first time you poll them, then never again), gcf() remains constant, as with ishandle() and isfigure(). Thus, I think there will have to be some changes to Octave's core before this can actually be done. I will mail the bugs list unless anyone has any other ideas.

   This is the closest I can come right now.
echo -e "plot([0:0.1:1], [0:0.1:1])\npause(3)\nexit()" > nothing.m && octave -q --persist nothing.m

Thanks,
Nicholas

--
http://ntung.com
reply via email to

[Prev in Thread] Current Thread [Next in Thread]