Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Merged
merged 1 commit into from
Dec 14, 2022

Conversation

timhoffm
Copy link
Member

Closes #24639.

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)``.
Copy link
Member Author

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.

.. note::
As a user, you do not instantiate Axes directly, but use Axes creation
methods instead.
Copy link
Member

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`.

Copy link
Member Author

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.

@ksunden ksunden modified the milestones: v3.6-doc, v3.6.3 Dec 14, 2022
@ksunden ksunden merged commit cc85fb6 into matplotlib:main Dec 14, 2022
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Dec 14, 2022
@timhoffm timhoffm deleted the doc-axes-creation branch December 14, 2022 20:25
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)
@ksunden ksunden mentioned this pull request Feb 20, 2023
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: surface_plot cannot generate image even the axis [Bug]: The Axes3D does not work as expected.
4 participants