New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image redraw problem on OSX with wx>2.9 & mpl>1.1 #3734
Comments
I have spent some more time on this and have noticed that in _onDrawIdle() in backend_wx.py, the wx.GetApp().Pending() call seems to always evaluate as True. I have also seen that I can find a similar bug in Windows w/only 64 bit wx, where after the first zoom, home or arrow use, .Pending also never stops returning as True. Patching draw_idle() to call self.draw() directly seems to solve at least some of the problems:
I suspect this causes other problems. This also does not address the uglyness when dragging the zoom box. |
The docstring for On a former job I worked around this issue by subclassing FigureCanvasWxAgg and overriding draw_idle like this:
It worked well for at least the use cases needed by that application (several histogram, scatter and img plots) and was tested on Windows and OSX. wxGTK ports should also do fine with this change. NOTE: the above will not fix the trails left behind while dragging the rubberband. I have another fix for that which I'll try to track down. |
To get a better rubberband effect that also doesn't leave trails on OSX, you can use a
|
@RobinD42 Thanks very much for the tips. If you would like to turn them into a PR, that would be even better; but if not, I expect they will get in one way or another. |
Yeah, I figured that would be the first question. 😉 I didn't have time to do a real PR today, but I'll try to do it soonish. |
closed by #3905 |
I have seen a problem on more than one Mac running OS X 10.9.x where MPL images are not updated properly. As one example of this, when one zooms a plot, by selecting the zoom widget, the rectangle is never erased and after it is "released" the plot is never redrawn with the new limits. This happens when I embed a figure into a wx Panel, as shown in the script below.
I do not see the problem with EPD (python 2.7.3, wxpython 2.8.10.1, matplotlib 1.1.0), but do with fairly recent Anaconda (python 2.7.8, wxpython 3.0.0.0, matplotlib 1.4.2) and Canopy (python 2.7.6, wxpython 2.9.2.4, matplotlib 1.3.1) dists.
The text was updated successfully, but these errors were encountered: