[Pythonmac-SIG] Re: Binary Matplotlib package, working. Need to keep script running after plotting.

Louis Pecora pecora at anvil.nrl.navy.mil
Mon Mar 7 20:06:21 CET 2005


Chris Barker wrote:

> How about the developer tools and/or X-windows?
>
> -Chris 

Hi Chris,

Yes, I have the dev. tools and and X11 stuff.  I have some old code that 
opens an X window and does very simple drawing.  That works after 
compiling using g++ and linking to /usr/X11R6/lib/libX11.a.  But note, I 
am very much an X windows novice.

I have since also installed wxPython.  The few tests I've done seem to 
work with it and using the WXAgg option in matplotlib I can get the plot 
window to appear after doing a show(). Very nice.  Can zoom, pan, save, etc.

BUT.  (Users are never satisfied are they/we? :-)  ).  My ultimate goal 
is to not wait until the end of the script to do the plot, but to be 
able to plot and keep the script running.  This can be done either by 
pausing the script (in some way) or by leaving the matplotwindow open 
and continuing with the script.   Most of my numerical code is menu 
driven with VERY simple menus through stdout and stdin printing and 
reading.  I am not sure how to do this type of plotting.  Thus far 
matplotlib wants to quit after a show().  Putting python code after 
show() never gets run.  Clicking the close button on the matplotlib 
window crashes Python. 

I am running from a terminal window for now using Pythonw since I also 
use EasyDialogs.  I've been looking over the docs and examples and 
haven't seen how to do this.  I've played with matplotlibrc setting 
"interactive" to True, but that did nothing.  After I do some 
time-pressing stuff, I'll get back to investigating this problem. 

Overall matplotlib looks fabulous and along with wxPython I can see the 
potential to have plot windows and some simple GUI interaction without 
getting smothered in GUI programming.   And I have to say your binary 
and the wxPython binary were trivial to install and get running.  
Thanks, again.

If you have any suggestions, just send them along.

-- 
Cheers,

Lou Pecora

Code 6362
Naval Research Lab
Washington, DC  20375
USA
Ph:  +202-767-6002
email:  pecora at anvil.nrl.navy.mil



More information about the Pythonmac-SIG mailing list