Thanks to visit codestin.com
Credit goes to github.com

Skip to content

draw_idle and draw_rubberband fixes for wxPython on OSX. #3905

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

Merged
merged 1 commit into from
Jan 8, 2015

Conversation

RobinD42
Copy link
Contributor

Should also improve performance and LnF on all platforms.
Compatible with at least wxPython 3.0.x and 2.[89].x.

See issue #3734

Should also improve performance and LnF on all platforms.
Compatible with at least wxPython 3.0.x and 2.[89].x.
@tacaswell
Copy link
Member

@briantoby can you confirm that these fix your issues?

@wernerfb does this conflict with anything in your PR?

@tacaswell tacaswell modified the milestones: v1.4.x, v1.4.3 Dec 12, 2014
@wernerfb
Copy link
Contributor

I am not about to contradict Robin:), if it conflicts with my changes I
will have to deal with them. I had a quick look at the code and I don't think this is something I touched.

Werner

@briantoby
Copy link

This helps, but still has problems, at least as I tested it. When I tried this by copying the changed file into matplotlib 1.4.2, I still had problems with the zoom button. As soon as I start dragging the mouse, the plot scaling changes so that while dragging the mouse, I only see the upper left-hand corner of the plot. As soon as I release the mouse, the plot updates to show the region that I zoomed in upon.

FWIW, I found that commenting out the odc.Clear() call in draw_rubberband():

def draw_rubberband(self, event, x0, y0, x1, y1):
    ...
    #odc.Clear()
    ...

prevents the change in scaling, but then the zoom becomes an opaque box overlaid on the plot.

Before zoom:
tmp untitled

During drag:
tmp untitled2

@RobinD42
Copy link
Contributor Author

@briantoby, are you on a system with a Retina display? I don't have one to experiment with, but it sounds like it might be related to that. Which version of wxPython are you using?

@briantoby
Copy link

Retina: yes (10.9.5 FWIW)

Also, yes, the problem goes away, when I use an external monitor connected to this laptop.

wxpython: 3.0.0.0

@briantoby
Copy link

Is there anything I can help test?

@RobinD42
Copy link
Contributor Author

I'm waiting on an answer to questions I asked in wx-dev to see if there is some way to use the wx.Overlay without the Retina issue, otherwise I'll come up with a different implementation for draw_rubberband that may not look as nice, but won't leave mouse trails behind. At that point some testing will be helpful.

@tacaswell
Copy link
Member

@RobinD42 Any eta on this? The target date for 1.4.3 is Feb 1 so we need to get an RC out in the next few weeks.

Is it worth merging this as-is and worrying about retina support later?

@RobinD42
Copy link
Contributor Author

RobinD42 commented Jan 8, 2015

@tacaswell, I havn't heard back about my questions related to wx.Overlay yet, I'll try again. In the meantime I think that an all-but-retina fix is probably better than the current implementation so I think it's worth merging.

I've had an idea that may work around the issue on retina displays, but its going to take some more work to be sure. I'll keep the idea simmering and will try to get back to it soon.

tacaswell added a commit that referenced this pull request Jan 8, 2015
BUG : draw_idle and draw_rubberband fixes for wxPython on OSX.
@tacaswell tacaswell merged commit a68e2a9 into matplotlib:v1.4.x Jan 8, 2015
@tacaswell tacaswell mentioned this pull request Jun 27, 2015
@RobinD42 RobinD42 deleted the fix-backend_wx-v1.4.x branch January 22, 2018 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants