FIX: allow add option for Axes3D(fig)#19413
FIX: allow add option for Axes3D(fig)#19413jklymak wants to merge 3 commits intomatplotlib:masterfrom
Conversation
|
(BTW Release Critical as the breaking change hasn't been released yet) |
|
Just a historical note... originally, one created Axes3D by doing |
|
Yeah given the differences I'm still a little torn about how to do this. Sticking add=False through our code isn't particularly nice. Adding the axes twice is unacceptable. Emitting a deprecation warning for something we think is acceptable is non optimal as well. I guess another option is to have add_axes check if the same axes object is already on the stack and not add it again. |
|
Waiting for #19438 |
|
Rather that touching the base classes |
|
Possibly? If you are in a groove and thinking about this I wouldn't be upset with a competing PR. |
|
Closing in lieu of #19496 |


PR Summary
Closes #18939
We changed the logic to deal with
Axes3d(fig)to not add the new axes tofigin #18564, but of course that broke some people who were working off older examples.This PR pops up a DeprecationWarning if folks use the old call, however, if they do the somewhat awkward:
they will also get a Deprecation Warning, which they can suppress with
However, the deprecation warning just suggests that they add the subplot the idiomatic way:
I'm not a super fan of this proposal - it pops up a warning for a valid if rare use case, but its better than mysteriously not adding the Axes3d object. and we can rip it all out in a cycle or two.
PR Checklist
pytestpasses).flake8on changed files to check).flake8-docstringsand runflake8 --docstring-convention=all).doc/users/next_whats_new/(follow instructions in README.rst there).doc/api/next_api_changes/(follow instructions in README.rst there).