-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
FIX: allow add option for Axes3D(fig) #19413
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
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 tofig
in #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
pytest
passes).flake8
on changed files to check).flake8-docstrings
and 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).