From: Fernando P. <fpe...@gm...> - 2012-01-29 20:45:34
|
On Sun, Jan 29, 2012 at 12:20 PM, Jerzy Karczmarczuk <jer...@un...> wrote: > This happens also with different backends and the driving interface (say, > Idle with Tkinter...) > Some solutions exist. The simplest one is the following. Thanks for the tips! It would really be nice if in animation mode, the mpl windows had automatically a play/pause toggle at the very least, so that regular users could get more functional animations without having to wire these extra tricks. I now see there's even a pause() call: https://github.com/matplotlib/matplotlib/pull/148 so it seems like it should be an easy matter of adding the button and wire it to pause(). Perhaps one of your students could make a nice contribution :) > Absolutely. > But first, you don't need to launch show() and force some mainloop(), > MainLoop(), gtk.main(), etc. under the hood. We wrote some loops under wx, > simple-minded ; there is one included in the standard docs-and-demos. I > don't know yet how to force WindowUpdate from Matplotlib, but some "plugin" > solution should exist, since Matplotlib does that already. > > Second, even if an event loop runs already, the question is to plug in the > access to the concrete event queue mechanism, not to superpose another one, > and yell with horror at which level declare callbacks... Best of luck. Having burned many hours on the ipython/matplotlib event loop integration over the years, I don't envy you right now if you're going to fight this little battle... But I'll happily cheer you from the safety of the sidelines :) Cheers, f |