Add Axis.get_inverted and Axis.set_inverted.#13330
Conversation
3c5be68 to
613a64b
Compare
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.
613a64b to
01aedbc
Compare
jklymak
left a comment
There was a problem hiding this comment.
I'm concerned about where we are storing the state of the axis. This moves more state into Axis, but the real home isAxes; the Axis is a slave of that takes care of implimenting the state of the Axes, and indeed all that Axis.get_view_interval() does is querry Axes.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