Add note that users do not instantiate Axes directly#24715
Merged
ksunden merged 1 commit intomatplotlib:mainfrom Dec 14, 2022
Merged
Add note that users do not instantiate Axes directly#24715ksunden merged 1 commit intomatplotlib:mainfrom
ksunden merged 1 commit intomatplotlib:mainfrom
Conversation
timhoffm
commented
Dec 13, 2022
Comment on lines
-27
to
-29
| .. 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)``. |
Member
Author
There was a problem hiding this comment.
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.
jklymak
reviewed
Dec 13, 2022
lib/matplotlib/axes/_axes.py
Outdated
| .. note:: | ||
|
|
||
| As a user, you do not instantiate Axes directly, but use Axes creation | ||
| methods instead. |
Member
There was a problem hiding this comment.
Can we give a couple of examples here?
e.g. From `.pyplot` or `.figure`: `figure.add_axes`, `figure.subplots`, `figure.subplot_mosaic`.
Member
Author
There was a problem hiding this comment.
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
tacaswell
approved these changes
Dec 14, 2022
ksunden
approved these changes
Dec 14, 2022
meeseeksmachine
pushed a commit
to meeseeksmachine/matplotlib
that referenced
this pull request
Dec 14, 2022
QuLogic
added a commit
that referenced
this pull request
Dec 15, 2022
…715-on-v3.6.x Backport PR #24715 on branch v3.6.x (Add note that users do not instantiate Axes directly)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #24639.