@@ -49,7 +49,7 @@ class Collection(artist.Artist, cm.ScalarMappable):
4949 - *antialiaseds*: None
5050 - *offsets*: None
5151 - *transOffset*: transforms.IdentityTransform()
52- - *offset_position*: 'screen' (default) or 'data'
52+ - *offset_position* (deprecated) : 'screen' (default) or 'data' (deprecated)
5353 - *norm*: None (optional for `matplotlib.cm.ScalarMappable`)
5454 - *cmap*: None (optional for `matplotlib.cm.ScalarMappable`)
5555 - *hatch*: None
@@ -59,8 +59,8 @@ class Collection(artist.Artist, cm.ScalarMappable):
5959 rendering (default no offsets). If offset_position is 'screen'
6060 (default) the offset is applied after the master transform has
6161 been applied, that is, the offsets are in screen coordinates. If
62- offset_position is 'data', the offset is applied before the master
63- transform, i.e., the offsets are in data coordinates.
62+ offset_position is 'data' (deprecated) , the offset is applied before the
63+ master transform, i.e., the offsets are in data coordinates.
6464
6565 If any of *edgecolors*, *facecolors*, *linewidths*, *antialiaseds* are
6666 None, they default to their `.rcParams` patch setting, in sequence form.
@@ -85,6 +85,7 @@ class Collection(artist.Artist, cm.ScalarMappable):
8585 # subclass-by-subclass basis.
8686 _edge_default = False
8787
88+ @cbook ._delete_parameter ("3.3" , "offset_position" )
8889 def __init__ (self ,
8990 edgecolors = None ,
9091 facecolors = None ,
@@ -130,7 +131,9 @@ def __init__(self,
130131 self .set_pickradius (pickradius )
131132 self .set_urls (urls )
132133 self .set_hatch (hatch )
133- self .set_offset_position (offset_position )
134+ self ._offset_position = "screen"
135+ if offset_position != "screen" :
136+ self .set_offset_position (offset_position ) # emit deprecation.
134137 self .set_zorder (zorder )
135138
136139 if capstyle :
@@ -404,7 +407,7 @@ def contains(self, mouseevent):
404407 self ._picker is not True # the bool, not just nonzero or 1
405408 else self ._pickradius )
406409
407- if self .axes and self . get_offset_position () == "data" :
410+ if self .axes :
408411 self .axes ._unstale_viewLim ()
409412
410413 transform , transOffset , offsets , paths = self ._prepare_points ()
@@ -413,7 +416,7 @@ def contains(self, mouseevent):
413416 mouseevent .x , mouseevent .y , pickradius ,
414417 transform .frozen (), paths , self .get_transforms (),
415418 offsets , transOffset , pickradius <= 0 ,
416- self .get_offset_position () )
419+ self ._offset_position )
417420
418421 return len (ind ) > 0 , dict (ind = ind )
419422
@@ -494,6 +497,7 @@ def get_offsets(self):
494497 else :
495498 return self ._uniform_offsets
496499
500+ @cbook .deprecated ("3.3" )
497501 def set_offset_position (self , offset_position ):
498502 """
499503 Set how offsets are applied. If *offset_position* is 'screen'
@@ -511,6 +515,7 @@ def set_offset_position(self, offset_position):
511515 self ._offset_position = offset_position
512516 self .stale = True
513517
518+ @cbook .deprecated ("3.3" )
514519 def get_offset_position (self ):
515520 """
516521 Return how offsets are applied for the collection. If
0 commit comments