|
From: Ken M. <mc...@ii...> - 2006-03-10 19:53:51
|
On Mar 7, 2006, at 6:18 PM, Samuel M. Smith wrote: > I ran the examples/anim.py and animation works in TkAgg and it > worked fine. > I ran the same script with WxAgg and animation does not work. The > graph window is blank during the animation. My take on this is that wxPython-mac can't repaint the plot window if it's not running its event loop. I have attached an example of animating WXAgg plots by redrawing them from within an idle event callback. If you're building an application that uses matplotlib for visualization, you can redraw the plot from within the running application without any problems (e.g. when new data arrives). You may also want to check out the animation_blit_wx.py example, which works more or less the same way. > I also tried CocoaAgg with similar result except that it also > appears to hang. It could be a really really slow frame rate but I > didn't wait around to find out. Since wxPython-mac is built on top of Cocoa, I'd imagine Cocoa has similar repainting problems. Ken |