@@ -99,14 +99,6 @@ def __init__(
99
99
does not produce the desired result. Note however, that a manual
100
100
zorder will only be correct for a limited view angle. If the figure
101
101
is rotated by the user, it will look wrong from certain angles.
102
- auto_add_to_figure : bool, default: False
103
- Prior to Matplotlib 3.4 Axes3D would add themselves
104
- to their host Figure on init. Other Axes class do not
105
- do this.
106
-
107
- This behavior is deprecated in 3.4, the default is
108
- changed to False in 3.6. The keyword will be undocumented
109
- and a non-False value will be an error in 3.7.
110
102
focal_length : float, default: None
111
103
For a projection type of 'persp', the focal length of the virtual
112
104
camera. Must be > 0. If None, defaults to 1.
@@ -145,7 +137,11 @@ def __init__(
145
137
self ._shared_axes ["z" ].join (self , sharez )
146
138
self ._adjustable = 'datalim'
147
139
148
- auto_add_to_figure = kwargs .pop ('auto_add_to_figure' , False )
140
+ if kwargs .pop ('auto_add_to_figure' , False ):
141
+ raise AttributeError (
142
+ 'auto_add_to_figure is no longer supported for Axes3D. '
143
+ 'Use fig.add_axes(ax) instead.'
144
+ )
149
145
150
146
super ().__init__ (
151
147
fig , rect , frameon = True , box_aspect = box_aspect , * args , ** kwargs
@@ -177,18 +173,6 @@ def __init__(
177
173
# for bounding box calculations
178
174
self .spines [:].set_visible (False )
179
175
180
- if auto_add_to_figure :
181
- _api .warn_deprecated (
182
- "3.4" , removal = "3.7" , message = "Axes3D(fig) adding itself "
183
- "to the figure is deprecated since %(since)s. "
184
- "Pass the keyword argument auto_add_to_figure=False "
185
- "and use fig.add_axes(ax) to suppress this warning. "
186
- "The default value of auto_add_to_figure is changed to "
187
- "False in mpl3.6 and True values will "
188
- "no longer work %(removal)s. This is consistent with "
189
- "other Axes classes." )
190
- fig .add_axes (self )
191
-
192
176
def set_axis_off (self ):
193
177
self ._axis3don = False
194
178
self .stale = True
0 commit comments