33import matplotlib
44from matplotlib import cbook , docstring , rcParams
55from matplotlib .artist import allow_rasterization
6+ import matplotlib .cbook as cbook
67import matplotlib .transforms as mtransforms
78import matplotlib .patches as mpatches
89import matplotlib .path as mpath
@@ -56,7 +57,7 @@ def __init__(self, axes, spine_type, path, **kwargs):
5657 self .set_transform (self .axes .transData ) # default transform
5758
5859 self ._bounds = None # default bounds
59- self ._smart_bounds = False
60+ self ._smart_bounds = False # deprecated in 3.2
6061
6162 # Defer initial position determination. (Not much support for
6263 # non-rectangular axes is currently implemented, and this lets
@@ -77,6 +78,7 @@ def __init__(self, axes, spine_type, path, **kwargs):
7778 # Note: This cannot be calculated until this is added to an Axes
7879 self ._patch_transform = mtransforms .IdentityTransform ()
7980
81+ @cbook .deprecated ("3.2" )
8082 def set_smart_bounds (self , value ):
8183 """Set the spine and associated axis to have smart bounds."""
8284 self ._smart_bounds = value
@@ -88,6 +90,7 @@ def set_smart_bounds(self, value):
8890 self .axes .xaxis .set_smart_bounds (value )
8991 self .stale = True
9092
93+ @cbook .deprecated ("3.2" )
9194 def get_smart_bounds (self ):
9295 """Return whether the spine has smart bounds."""
9396 return self ._smart_bounds
@@ -268,7 +271,7 @@ def _adjust_location(self):
268271 raise ValueError ('unknown spine spine_type: %s' %
269272 self .spine_type )
270273
271- if self ._smart_bounds :
274+ if self ._smart_bounds : # deprecated in 3.2
272275 # attempt to set bounds in sophisticated way
273276
274277 # handle inverted limits
0 commit comments