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?
Haven't had a chance to test your example yet but hopefully I can take
a look tomorrow. I haven't done much memory leak testing against the
_image module yet so this will be a good opportunity. I very recently
rewrote _image.cpp using cxx. I trust you have a fresh CVS checkout?
As for the flicker problem, I've noticed it too, and would also be
thankful if any wx gurus have some advice.
BTW, wxagg currently uses a string copy in python to render agg to a
wx bitmap via a wx image. It would be nice if some enterprising
soul wrote some extension code ala _tkagg.cpp and _gtkagg.cpp which
transfers the agg canvas to wx directly. Should be a pretty big win
performance wise. We could keep the string method as a fallback in
case the extension wasn't compiled, but it would help for people who
want to use wxagg for dynamic applications (hint hint).
This should at least be on the goals page.