You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Warn re: Axes3D constructor behavior change in mpl3.4 #18939
Ahh I just didn't notice that change. A warning that it is no longer added would have made finding the problem immediately apparent, so +1 for that solution if it's tractable.
Actually a simpler approach would be just to add a add=True argument to Axes3D. Then people who used it like I did get their behavior preserved, and internally matplotlib can do add=False. Then there isn't any need for the release notes or user changes. And hopefully it's just two lines if add: fig.add_subplot(self) or so.
Activity
anntzer commentedon Nov 12, 2020
That was actually mostly discussed in #18356. The change was definitely intentional (as both #18356 and #18564 needed it) and documented at https://github.com/matplotlib/matplotlib/blob/master/doc/api/next_api_changes/behavior/18564-AL.rst; do you want to discuss reverting it, or emit a warning, or something else?
larsoner commentedon Nov 12, 2020
Ahh I just didn't notice that change. A warning that it is no longer added would have made finding the problem immediately apparent, so +1 for that solution if it's tractable.
anntzer commentedon Nov 12, 2020
I think we can (temporarily) add a warning in
Axes3D.__del__checking whether the axes has ever been added to a figure.[-]BUG: Regression in Axes3D use[/-][+]Warn re: Axes3D constructor behavior change in mpl3.4[/+]larsoner commentedon Nov 12, 2020
Actually a simpler approach would be just to add a
add=Trueargument toAxes3D. Then people who used it like I did get their behavior preserved, and internallymatplotlibcan doadd=False. Then there isn't any need for the release notes or user changes. And hopefully it's just two linesif add: fig.add_subplot(self)or so.MNT: Restore and deprecate auto-adding Axes3D to figure on init
MNT: Restore and deprecate auto-adding Axes3D to figure on init
MNT: Restore and deprecate auto-adding Axes3D to figure on init