Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c8e610e

Browse files
committed
Make AxesStack private
1 parent c4382b0 commit c8e610e

2 files changed

Lines changed: 16 additions & 6 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Deprecations
2+
````````````
3+
4+
``matplotlib.figure.AxesStack`` is considered private API and will be removed
5+
from the public API in future versions.

lib/matplotlib/figure.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
164169
class 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

Comments
 (0)