X Tutup
Skip to content

Add note that users do not instantiate Axes directly#24715

Merged
ksunden merged 1 commit intomatplotlib:mainfrom
timhoffm:doc-axes-creation
Dec 14, 2022
Merged

Add note that users do not instantiate Axes directly#24715
ksunden merged 1 commit intomatplotlib:mainfrom
timhoffm:doc-axes-creation

Conversation

@timhoffm
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

X Tutup