-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add note that users do not instantiate Axes directly #24715
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
.. versionchanged:: 1.0.0 | ||
Prior to Matplotlib 1.0.0, only a single `.Axes3D` could be created per | ||
figure; it needed to be directly instantiated as ``ax = Axes3D(fig)``. |
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.
This is so ancient that there is little value in keeping, and the stated way of creation is not recommended anymore. So it's simplest to remove completely.
lib/matplotlib/axes/_axes.py
Outdated
.. note:: | ||
|
||
As a user, you do not instantiate Axes directly, but use Axes creation | ||
methods 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 give a couple of examples here?
e.g. From `.pyplot` or `.figure`: `figure.add_axes`, `figure.subplots`, `figure.subplot_mosaic`.
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.
Ideally, we'd have #17376 to link to. But since this does not exist yet, I've taken the suggestion to give some examples.
5595874
to
de8d265
Compare
…715-on-v3.6.x Backport PR #24715 on branch v3.6.x (Add note that users do not instantiate Axes directly)
Closes #24639.