Update and factor out Axis.get_tick_positions.#13335
Update and factor out Axis.get_tick_positions.#13335NelleV merged 1 commit intomatplotlib:masterfrom
Conversation
lib/matplotlib/axis.py
Outdated
| the first major and the first minor ticks, and return | ||
|
|
||
| - 1 if only tick1line and label1 are visible; | ||
| - 2 if only tick2line and label2 are visible; |
There was a problem hiding this comment.
comment here why these are left ambiguous....
There was a problem hiding this comment.
Because they become "top"/"bottom" for the x-axis but "left"/"right" for the y-axis? For an abstract Axis, 1 and 2 are the names of the ticks and labels, they don't have string names yet.
There was a problem hiding this comment.
Yes, I understand, but it took me a bit, and it will be even more mysterious for someone who doesn't have the diff to look at. Just adding a one-line comment here would make it clearer...
There was a problem hiding this comment.
I think it would be useful to clarify that 1 means "top" or "bottom" and 2 means "left" or "right" in the docstring here.
dstansby
left a comment
There was a problem hiding this comment.
👍 on code, docstring could be clarified though
lib/matplotlib/axis.py
Outdated
| the first major and the first minor ticks, and return | ||
|
|
||
| - 1 if only tick1line and label1 are visible; | ||
| - 2 if only tick2line and label2 are visible; |
There was a problem hiding this comment.
I think it would be useful to clarify that 1 means "top" or "bottom" and 2 means "left" or "right" in the docstring here.
YAxis.get_ticks_position had not been updated after the deprecation of label1On. Fix that by making it share its implementation with XAxis.get_ticks_position.
YAxis.get_ticks_position had not been updated after the deprecation of
label1On (#10088). Fix that by making it share its implementation with
XAxis.get_ticks_position.
Release critical as YAxis.get_ticks_position otherwise emits a DeprecationWarning.
PR Summary
PR Checklist