Hi plotters,
I've shamelessly modified dynamic_demo_wx.py to create dynamic_image_wxagg.py, attached. This is my initial attempt to get matplotlib to dynamically update images. Basically it all works hunky-dory except 1) an apparent memory leak and 2) flicker when I run this in linux (haven't tested other OSes). I offer #1 to John or other memory-leak hunters out there and ask if any WXpert can address #2. I've googled a bit and it appears the WX backend (from which WXAgg is derived) does the Right Thing and calls wxClientDC on a non-OS generated redraw request, which is supposed to reduce or eliminate flicker. The other tip is to catch EVT_ERASE_BACKGROUND, which I've also done to no apparent improvement. Thus, I ask for help -- any suggestions on how to eliminate this flicker?
John -- feel free to stick this in examples if you think it's worthy.
Cheers!
Andrew
dynamic_image_wxagg.py (3.55 KB)