Skip to content

Fixes zoom rubberband display on macOS w/ wxagg and multiple subplots #9005

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 4 commits into from
Aug 7, 2017
Merged

Fixes zoom rubberband display on macOS w/ wxagg and multiple subplots #9005

merged 4 commits into from
Aug 7, 2017

Conversation

jbhopkins
Copy link
Contributor

PR Summary

This fixes an issue where the zoom box (rubberband) was not displaying correctly when using the wxagg backend on macOS/OS X and a figure had multiple subplots.
It is a fix for the following issue:
#9004

PR Checklist

  • Code is PEP 8 compliant

…S when using the wxagg backend and multiple subfigures.
event.inaxes.bbox)
self.zoomStartX = event.xdata
self.zoomStartY = event.ydata
self.zoomAxes = event.inaxes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make this a private member (precede it with an underscore)? Also, we should probably clear it when the rubber-banding is finished so we don't hang onto the axes reference.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thats easy enough to do. However, making it private makes it inconsistent with the zoomStart variables, which is why I left it as is. I could also change those, but wasn't sure if they were public for a reason. Thoughts?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No clue if they were public for any particular reason except legacy. We should keep those two as-is, but the zoomAxes should be private under the philosophy that it is easier to make something public later, than to make it private. If it doesn't need to be public, then default to private for anything new.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case I think it makes more senses to be consistent with the existing group of names on the 'when-in-rome' principle.

Lets leave everything as 'public' for now.

@tacaswell tacaswell added this to the 2.1 (next point release) milestone Aug 7, 2017
@WeatherGod
Copy link
Member

Still need to release a reference to the axes when rubber-banding is done.

@tacaswell
Copy link
Member

@jbhopkins Thanks for bearing with us on this in your first Matplotlib PR!

@jbhopkins
Copy link
Contributor Author

Happy to help, @tacaswell .
@WeatherGod I've updated it so that it releases the reference.

@tacaswell tacaswell merged commit 3bf8dcc into matplotlib:master Aug 7, 2017
@tacaswell
Copy link
Member

@jbhopkins Thank you and congratulations on your first Matplotlib PR 🎉 !

Hopefully we will hear from you again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants