Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Add Axis.get_inverted and Axis.set_inverted.#13330
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
See rationale in changelog note (basically, Axes.invert_xaxis is finefor interactive use, but a bit of a pain for library-work).Note that xaxis_inverted is now implemented in terms of get_inverted andinvert_xaxis in terms of set_inverted, so the new methods are properlytested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I'm concerned about where we are storing the state of the axis. This moves more state intoAxis
, but the real home isAxes
; the Axis is a slave of that takes care of implimenting the state of the Axes, and indeed all thatAxis.get_view_interval()
does is querryAxes.viewLim.intervalx
. So I'm against setting the view interval here (though that already exists) and I'm against setting whether that interval is inverted or not here. I think this should all be done at the Axes level...
The Axis and Axes classes are obviously tightly coupled, but in my view, methods that logically act on a single Axis should, actually, be implemented as Axis methods, not as pairs of Axes methods. If it was up to me, we'd have |
I guess |
See rationale in changelog note (basically, Axes.invert_xaxis is fine
for interactive use, but a bit of a pain for library-work).
Note that xaxis_inverted is now implemented in terms of get_inverted and
invert_xaxis in terms of set_inverted, so the new methods are properly
tested.
PR Summary
PR Checklist