@@ -4354,17 +4354,15 @@ def get_mutation_aspect(self):
4354
4354
else 1 ) # backcompat.
4355
4355
4356
4356
def get_path (self ):
4357
- """
4358
- Return the path of the arrow in the data coordinates. Use
4359
- get_path_in_displaycoord() method to retrieve the arrow path
4360
- in display coordinates.
4361
- """
4362
- _path , fillable = self .get_path_in_displaycoord ()
4357
+ """Return the path of the arrow in the data coordinates."""
4358
+ # The path is generated in display coordinates, then converted back to
4359
+ # data coordinates.
4360
+ _path , fillable = self ._get_path_in_displaycoord ()
4363
4361
if np .iterable (fillable ):
4364
4362
_path = Path .make_compound_path (* _path )
4365
4363
return self .get_transform ().inverted ().transform_path (_path )
4366
4364
4367
- def get_path_in_displaycoord (self ):
4365
+ def _get_path_in_displaycoord (self ):
4368
4366
"""Return the mutated path of the arrow in display coordinates."""
4369
4367
dpi_cor = self ._dpi_cor
4370
4368
@@ -4389,18 +4387,22 @@ def get_path_in_displaycoord(self):
4389
4387
4390
4388
return _path , fillable
4391
4389
4390
+ get_path_in_displaycoord = _api .deprecate_privatize_attribute (
4391
+ "3.5" ,
4392
+ alternative = "self.get_transform().transform_path(self.get_path())" )
4393
+
4392
4394
def draw (self , renderer ):
4393
4395
if not self .get_visible ():
4394
4396
return
4395
4397
4396
4398
with self ._bind_draw_path_function (renderer ) as draw_path :
4397
4399
4398
4400
# FIXME : dpi_cor is for the dpi-dependency of the linewidth. There
4399
- # could be room for improvement. Maybe get_path_in_displaycoord
4401
+ # could be room for improvement. Maybe _get_path_in_displaycoord
4400
4402
# could take a renderer argument, but get_path should be adapted
4401
4403
# too.
4402
4404
self ._dpi_cor = renderer .points_to_pixels (1. )
4403
- path , fillable = self .get_path_in_displaycoord ()
4405
+ path , fillable = self ._get_path_in_displaycoord ()
4404
4406
4405
4407
if not np .iterable (fillable ):
4406
4408
path = [path ]
@@ -4612,7 +4614,7 @@ def get_annotation_clip(self):
4612
4614
"""
4613
4615
return self ._annotation_clip
4614
4616
4615
- def get_path_in_displaycoord (self ):
4617
+ def _get_path_in_displaycoord (self ):
4616
4618
"""Return the mutated path of the arrow in display coordinates."""
4617
4619
dpi_cor = self ._dpi_cor
4618
4620
posA = self ._get_xy (self .xy1 , self .coords1 , self .axesA )
0 commit comments