-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Clarify that explicit ticklabels are used without further formatting. #26951
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
Conversation
I think "Labels cannot be further formatted using a |
This feels too focused on the specific question asked in #26947: if you are that user and seeing exactly that problem, sure, that sentence will help. But if you're just reading this docstring without having met exactly the problem reported in #26947, I do think that addition would just confuse things. |
To me, the proposed version suggests that you don't need to use a formatter, not that you can't use a formatter. |
Independent of if we agree that this closes #26947, this is an improvement to the docs. |
@tacaswell Good to go? |
The person who opened #26947 said this wording probably wouldn't prevent them from making the same mistake, so yeah it doesn't close #26947 #26947 (comment) |
lib/matplotlib/axis.py
Outdated
@@ -1962,7 +1962,7 @@ def set_ticklabels(self, labels, *, minor=False, fontdict=None, **kwargs): | |||
labels : sequence of str or of `.Text`\s | |||
Texts for labeling each tick location in the sequence set by | |||
`.Axis.set_ticks`; the number of labels must match the number of | |||
locations. | |||
locations. The labels are used as is, without further formatting. |
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.
Maybe make it explicit that a Formatter is being used, and hence if you use another it will obviate this one?
locations. The labels are used as is, without further formatting. | |
locations. The labels are used as is, and passed to a `.FixedFormatter`. |
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 find "used as is" ambiguous b/c it's unclear to me what state "as is" is referring to.
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 went for a variant of @jklymak's wording.
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.
Looks like only one entry was changed?
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.
indeed, fixed.
This was not made explicit in the docs (it is in essence due to the use of FixedFormatter, but that's a rather involved detail for end users). Also minor rewordings.
This was not made explicit in the docs (it is in essence due to the use of FixedFormatter, but that's a rather involved detail for end users). Also minor rewordings.
Closes #26947.
PR summary
PR checklist