From: Mark E. <ma...@st...> - 2004-07-28 05:44:12
|
Hi, I am not in interactive mode, I am writing scripts that handle a bunch of data and then plot it all. However, when show() is called, the script stops and waits for all the windows it opens to be closed before continuing. What I was hoping for was a way to have the plots be drawn in windows that were no longer hooked into the script, such that the script could continue running (to completion) regardless of what happened to the open windows. I did try 'draw()', which does not appear to open any new windows. In answer to your questions, here are the relevant lines from my .matplotlibrc: backend : GTKAgg # the default backend numerix : numarray #Numeric # Numeric or numarray interactive : False # see http://matplotlib.sourceforge.net/interactive.htm Thanks for everyone's help on subplot positioning (or avoidance ;)) - I'll take a look. - Mark On Jul 26, 2004, at 2:06 PM, John Hunter wrote: > Mark> 2. Is there a way to make the 'show()' command execute so > Mark> that the script keeps running (instead of waiting for the > Mark> windows to be closed), and to have the output persist past > Mark> the end of the run? > > You should only call show once per script. I repeat, you should only > call show once per script - > http://matplotlib.sourceforge.net/faq.html#SHOW > > matplotlib-0.60.2 has a "draw" command to force a canvas redraw. This > is non blocking. Earlier versions allow you to do, equivalently, > get_current_fig_manager().canvas.draw(). Does this do what you want? > I am not sure what you are after when you write "have the output > persist past the end of the run". Launch the python interpreter? > > Please let me know what backend you are using and explain a bit more > what it is you are trying to do. Are you running in interactive mode? > > JDH > |