1010import numpy as np
1111import matplotlib
1212import matplotlib .cbook as cbook
13- from matplotlib .cbook import mplDeprecation
1413from matplotlib import docstring , rcParams
1514from .transforms import (Bbox , IdentityTransform , TransformedBbox ,
1615 TransformedPatchPath , TransformedPath , Transform )
@@ -207,32 +206,6 @@ def convert_yunits(self, y):
207206 return y
208207 return ax .yaxis .convert_units (y )
209208
210- def set_axes (self , axes ):
211- """
212- Set the :class:`~matplotlib.axes.Axes` instance in which the
213- artist resides, if any.
214-
215- This has been deprecated in mpl 1.5, please use the
216- axes property. Will be removed in 1.7 or 2.0.
217-
218- ACCEPTS: an :class:`~matplotlib.axes.Axes` instance
219- """
220- warnings .warn (_get_axes_msg .format ('set_axes' ), mplDeprecation ,
221- stacklevel = 1 )
222- self .axes = axes
223-
224- def get_axes (self ):
225- """
226- Return the :class:`~matplotlib.axes.Axes` instance the artist
227- resides in, or *None*.
228-
229- This has been deprecated in mpl 1.5, please use the
230- axes property. Will be removed in 1.7 or 2.0.
231- """
232- warnings .warn (_get_axes_msg .format ('get_axes' ), mplDeprecation ,
233- stacklevel = 1 )
234- return self .axes
235-
236209 @property
237210 def axes (self ):
238211 """
@@ -243,18 +216,14 @@ def axes(self):
243216
244217 @axes .setter
245218 def axes (self , new_axes ):
246-
247- if (new_axes is not None and
248- (self ._axes is not None and new_axes != self ._axes )):
249- raise ValueError ("Can not reset the axes. You are "
250- "probably trying to re-use an artist "
251- "in more than one Axes which is not "
252- "supported" )
253-
219+ if (new_axes is not None and self ._axes is not None
220+ and new_axes != self ._axes ):
221+ raise ValueError ("Can not reset the axes. You are probably "
222+ "trying to re-use an artist in more than one "
223+ "Axes which is not supported" )
254224 self ._axes = new_axes
255225 if new_axes is not None and new_axes is not self :
256226 self .stale_callback = _stale_axes_callback
257-
258227 return new_axes
259228
260229 @property
0 commit comments