@@ -51,16 +51,16 @@ def _stale_figure_callback(self, val):
5151 self .figure .stale = val
5252
5353
54- class AxesStack (cbook .Stack ):
54+ class _AxesStack (cbook .Stack ):
5555 """
5656 Specialization of the `.Stack` to handle all tracking of
5757 `~matplotlib.axes.Axes` in a `.Figure`.
5858 This stack stores ``key, (ind, axes)`` pairs, where:
5959
60- * **key** should be a hash of the args and kwargs
61- used in generating the Axes.
62- * **ind** is a serial number for tracking the order
63- in which axes were added.
60+ * **key** should be a hash of the args and kwargs
61+ used in generating the Axes.
62+ * **ind** is a serial number for tracking the order
63+ in which axes were added.
6464
6565 The AxesStack is a callable, where ``ax_stack()`` returns
6666 the current axes. Alternatively the :meth:`current_key_axes` will
@@ -161,6 +161,11 @@ def __contains__(self, a):
161161 return a in self .as_list ()
162162
163163
164+ @cbook .deprecated ("3.2" )
165+ class AxesStack (_AxesStack ):
166+ pass
167+
168+
164169class SubplotParams (object ):
165170 """
166171 A class to hold the parameters for a subplot.
@@ -378,7 +383,7 @@ def __init__(self,
378383
379384 self .set_tight_layout (tight_layout )
380385
381- self ._axstack = AxesStack () # track all figure axes and current axes
386+ self ._axstack = _AxesStack () # track all figure axes and current axes
382387 self .clf ()
383388 self ._cachedRenderer = None
384389
0 commit comments