-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[Bug]: The Axes3D does not work as expected. #24639
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
Comments
Axes objects need correct wiring up with the figure. Therefore, you never instantiate any Axes directly, but use the Axes creation methods on Figure (or pyplot), which do that logic for you.I think this is consistently shown throughout our documentation. Have you found a place that suggests otherwise? Todo: Maybe we should add a note to Axes constructors that they are not intended for the end-user. |
There is a note here: https://matplotlib.org/stable/tutorials/toolkits/mplot3d.html "Changed in version 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)." This can possibly be dropped now? But also it indicates that there are old examples out there using this. (Some tests use |
Between this issue and #24725 what is happening that this came up 2x in a week or so but not for the last 4 months from when 3.6 came out? |
Bug summary
The Axes3D does not work as expected.
Code for reproduction
Actual outcome
The outcome figure is blank.
Expected outcome
Should show figure with correct content.
Additional information
The code works well if changed to
fig, ax = plt.subplots(subplot_kw={"projection": "3d"})
Operating system
Windows
Matplotlib Version
3.6.2
Matplotlib Backend
Qt5Agg
Python version
3.9.15
Jupyter version
NA
Installation
conda
The text was updated successfully, but these errors were encountered: