As with all other commands in matplotlib, show is blocking. The interpreter stops at that line until the window closes.
To do interactive things with a separate GUI event loop, have a look at the demos in the event_handling directory of the examples. Mike Nick Vaidyanathan wrote: > The figure would open and remain visible, but would not respond in the > expected manner to a button press. Consequently, Python would error > out saying "package does not contain method waitforbuttonpress()". I > was working on a school computer, 32-bit Intel that had just > downloaded a fresh version of whatever Enthought has inside, so you > might want to check in that package. > > On Wed, Oct 15, 2008 at 5:41 AM, Michael Droettboom <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > Nick Vaidyanathan wrote: > > Does not exist here: > http://matplotlib.sourceforge.net/doc/html/api/pyplot_api.html > Which is curious, because it's plainly shown (PUNZ!) here: > http://matplotlib.sourceforge.net/doc/html/users/pyplot_tutorial.html > Now here's t3h sex: given the documentation, I kind of expect > this to work: > ---Python Code--- > plotter.plot(xs,ys,'ro') > plotter.grid(True) > plotter.savefig('myresult.png') > plotter.show() > plotter.waitforbuttonpress(1) > plotter.close() > ---End Python Code--- > I would expect that would keep my window open for a second, > or until I keyed a button, and then close it. No dice. > > What, in fact, is happening for you? No window at all? Perhaps > your backend is set to a non-GUI backend? Can you send us your > matplotlibrc file? > > Cheers, > Mike > > ...actually, I got my matplotlib through enthought, which has > an old version of the package (.91)...but a simple google > search for "matplotlib 0.91 api" doesn't show that package's > docs on the front page...help? > > ------------------------------------------------------------------------ > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move > Developer's challenge > Build the coolest Linux based applications with Moblin SDK & > win great prizes > Grand prize is a trip for two to an Open Source event anywhere > in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > <http://moblin-contest.org/redirect.php?banner_id=100&url=/> > > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > <mailto:Matplotlib-users@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > -- > Michael Droettboom > Science Software Branch > Operations and Engineering Division > Space Telescope Science Institute > Operated by AURA for NASA > > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users