|
From: John H. <jd...@gm...> - 2010-02-09 16:19:44
|
On Tue, Feb 9, 2010 at 10:06 AM, Wayne Watson <sie...@sb...> wrote: > I'm sure not making much progress on understanding show(). When used in > XP in IDLE or by file execution (click on file name), it seems to tie up > the executing program. In IDLE, the shell window stops and one must > exit the window. > > I'd appreciate it if someone could take any examples from > <http://matplotlib.sourceforge.net/index.html> and try to execute them > as in the first paragraph to see if they terminate successfully.Let me > know what OS used, hopefully XP, and if you used IDLE or file execution. > I suspect you will find every example there ends with show(). Try > putting a print statement after show() you've done it with the show() > the last line. "show" is meant to start the GUI mainloop, which is usually blocking, and raise all windows, so the behavior you are reporting is the intended behavior. When working interactively, as in Idle, you shouldn't need to use show if you turn interactive mode on. http://matplotlib.sourceforge.net/users/shell.html We recommend using ipython in pylab model when working interactively because it is designed to make the correct interactive settings and override "show" to be non-blocking. You can obtain the right results in matplotlib using Idle if you are careful, but for "just works out of the box" ipython in pylab mode will be easier. JDH |