Dear developers,

I discovered that in backend_wx.py in _onPaint(), the callback function 
for repainting a matplotlib figure, every time a repaint is done also 
the bitmap is rerendered:

backend_wx.py/_onPaint():
...
# Render to the bitmap
self.draw(repaint=False)
...

This also affects the behaviour of the wxagg backend. Rerendering and 
therefore also repainting gets quite slow if, e.g., images are included 
in the figure. I can see this by simply dragging another window across 
the matplotlibfigure. Commenting out the rerendering I get a much 
smoother behaviour. I could not observe problems except that sometimes 
some parts of the figure are not properly repainted if the matplotlib 
figure is in the background (I only tested the wxagg backend). Therefore 
it seems that this rerendering every time a repaint is performed is not 
really necessary and should be avoided.

I tested this on matplotlib 0.91.2 on WinXP, Python 2.5, wx 2.8.7. I 
checked that in the current svn version the _onPaint() function is 
unchanged.

Gregor

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to