Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
MNT: Prevent users from erroneously using legend label API on Axis#28584
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
f848210
to2a4710a
CompareNeed to fix internal usage of |
lib/matplotlib/axis.py Outdated
.. admonition:: Discouraged | ||
This overrides `.Artist.get_label`, which is for legend labels, with a new | ||
semantic. It is recommended to use the attribute `.Axis.label` instead. |
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've been defensive here and only discouraged but not deprecated this. It's been working for users and I'm not clear whether a deprecation is worth it. We can always add a deprecation later.
Uh oh!
There was an error while loading.Please reload this page.
.. admonition:: Discouraged | ||
This overrides `.Artist.get_label`, which is for legend labels, with a new | ||
semantic. It is recommended to use the attribute ``Axis.label`` instead. |
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.
Can we getAxis.label
documented so this will link?
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.
The way attributes are currently documented - Attributes section in the class docstring (https://matplotlib.org/stable/api/axis_api.html#matplotlib.axis.Axis) - they cannot be referenced. I believe we must swich to something like#28825. But before going full scale, we should test it onAxes
in#28825. This is far beyond this PR. I would like to get this PR into 3.10, but don't want to push the documentation restructuring for it. For now, I suggest that literal is good enough and we can do attribute linking when there is time.
Closesmatplotlib#27971.For a complete explanation seematplotlib#27971 (comment)
537ea7a
intomatplotlib:mainUh oh!
There was an error while loading.Please reload this page.
It looks like we missed that this broke docs?
|
…atplotlib#28584)Closesmatplotlib#27971.For a complete explanation seematplotlib#27971 (comment)
Closes#27971.
For a complete explanation see#27971 (comment)