SourceForge logo
SourceForge logo
Menu

[matplotlib-devel] Unnecessary rerendering in wx/wxagg backends

From: Gregor T. <gre...@gm...> - 2008年03月31日 14:58:36
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

View entire thread

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /