Scott, I think that for interactive work such as you describe, ipython -pylab pretty well solves the problem, and provides window behavior like matlab's.
Ipython is a big help when working with python even when you are not plotting. It is easy to install, and you don't have to learn much to start using it to good advantage. See http://ipython.scipy.org/moin/ Eric SRH wrote: > > Daniel Ashbrook wrote: >> The issue is that the >> show() command takes over the main thread of execution, so I can't have >> my listening process running. Essentially I need to: >> >> 1) Pop up a figure() >> 2) Start the drawing loop >> 3) Start the socket listener >> 4) When the listener gets commands, execute them (plot, etc) >> >> Is this something that I can do? >> Thanks, >> dan >> > > > I've been running into _exactly_ this issue for the past few weeks trying to > get matplotlib windows to behave a bit more like Matlab plots (or other > tools). I'm pretty new to Python and threaded GUIs (trying to come up to > speed)... maybe it's obvious to others more experienced about how to do > these things, but hard for us to explain the problem. I'll try to explain > the desired/expected behavior from a Matlab user point of view: > > When using Matlab, one often creates plots in interactive (command line) > operations, or when calling scripts (m-files). But multiple plot windows > can be left open/running, and all other operations can proceed as normally - > that is, there is no blocking, and the windows behave as independent > entities - always active and not affecting behavior of other windows at all. > For example, one can run a script that creates a few plots, edit the script, > run it again, and have both the original plot windows and the new ones up at > the same time for comparision. It's the blocking behavior of show() that is > most perplexing. (While GTK may be threaded, matplotlib's show() doesn't > behave that way...) > > There's a post on osdir.com from 2004 where John posted example code of how > to use the underlying GTK functions for a show() that's unique to each > window's thread, rather than the the matplotlib show() which appears to take > over (block) the entire Python process until the window is closed: > > http://osdir.com/ml/python.matplotlib.general/2004-07/msg00070.html > > I've seen this question come up in several posts without adequate answers, > until I came across that one. It would be great if we (or someone) can > write up a summary of this and get it into the Matplotlib docs. (Point me > in the right direction and I'll make an attempt.) > > (Nice plotting tool, by the way, John et al. Good work.) > Thanks, > Scott ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users