On Thu, Feb 11, 2010 at 2:41 AM, Wayne Watson <sierra_mtnv...@sbcglobal.net> wrote: > A Ground Hog movie moment? Deja vu all over again (Quoting Yega Berra.). > > I went right through John Hunter's comment of a day or two ago about the > need to solve this with ipython. That has to be taken into > consideration; otherwise, this is a no-go..
Instead of focusing on "show", you should describe the problem you are trying to solve. From previous posts, it sounds like you are trying to use pyplot in a mode is was not designed to handle. You said you are delivering a python application that uses matplotlib to users who do not know python, and using Idle to run the app. Why? Why use idle in an app for users who do not know python since it is a python IDE. You also said that this was not your design decision and so it sounds like you are working on code someone else developed so you may be suffering from someone else's bad design decisions. My guess is you would have much more success embedding matplotlib in a GUI toolkit of your choice and then you have complete control over the mainloop, the threading, how and when windows are raised in what order. http://matplotlib.sourceforge.net/examples/user_interfaces/index.html "show" is meant to be the last line of a script and raise all of the figures generated in that script at once. interactive mode including ipython in pylab mode is meant for python coders who want to create and modify figures typing python code at the interactive shell prompt. User interface embedding is for developers who want to deploy mpl in an application to users who may or may not know python where the developer wants complete control of figure and window management -- this sounds like your use case. Trying to shoehorn one mode into another will lead to frustration. Writing user interface applications can be hard and tedious (though there are tools like enthought traits to make it less so). pyplot is technically a user interface application which is a scripting language to make figures. Because it is easy, some people who want to write more complex applications only using pyplot and this can be done up to a point with judicious use of event handling and GUI idle handlers, etc (see http://matplotlib.sourceforge.net/users/event_handling.html). But at some point you will hit the wall because you are trying to make pyplot do something it is not designed to do, but don't blame pyplot (or pyplot.show). matplotlib is readily usable in complex user interface applications -- in fact that is what it was designed for -- and pyplot is just an interface sitting on top of that, but you must use the matplotlib API and directly embed the matplotlib canvas and toolbar in your application to reach this potential. JDH ------------------------------------------------------------------------------ SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users