@@ -3829,6 +3829,7 @@ def __str__(self):
3829
3829
return f"{ type (self ).__name__ } ({ self ._path_original } )"
3830
3830
3831
3831
@docstring .dedent_interpd
3832
+ @cbook ._delete_parameter ("3.4" , "dpi_cor" )
3832
3833
def __init__ (self , posA = None , posB = None ,
3833
3834
path = None ,
3834
3835
arrowstyle = "simple" ,
@@ -3897,7 +3898,7 @@ def __init__(self, posA=None, posB=None,
3897
3898
3898
3899
dpi_cor : float, default: 1
3899
3900
dpi_cor is currently used for linewidth-related things and shrink
3900
- factor. Mutation scale is affected by this.
3901
+ factor. Mutation scale is affected by this. Deprecated.
3901
3902
3902
3903
Other Parameters
3903
3904
----------------
@@ -3939,8 +3940,9 @@ def __init__(self, posA=None, posB=None,
3939
3940
self ._mutation_scale = mutation_scale
3940
3941
self ._mutation_aspect = mutation_aspect
3941
3942
3942
- self .set_dpi_cor ( dpi_cor )
3943
+ self ._dpi_cor = dpi_cor
3943
3944
3945
+ @cbook .deprecated ("3.4" )
3944
3946
def set_dpi_cor (self , dpi_cor ):
3945
3947
"""
3946
3948
dpi_cor is currently used for linewidth-related things and
@@ -3953,6 +3955,7 @@ def set_dpi_cor(self, dpi_cor):
3953
3955
self ._dpi_cor = dpi_cor
3954
3956
self .stale = True
3955
3957
3958
+ @cbook .deprecated ("3.4" )
3956
3959
def get_dpi_cor (self ):
3957
3960
"""
3958
3961
dpi_cor is currently used for linewidth-related things and
@@ -4118,7 +4121,7 @@ def get_path(self):
4118
4121
4119
4122
def get_path_in_displaycoord (self ):
4120
4123
"""Return the mutated path of the arrow in display coordinates."""
4121
- dpi_cor = self .get_dpi_cor ()
4124
+ dpi_cor = self ._dpi_cor
4122
4125
4123
4126
if self ._posA_posB is not None :
4124
4127
posA = self ._convert_xy_units (self ._posA_posB [0 ])
@@ -4151,8 +4154,10 @@ def draw(self, renderer):
4151
4154
with self ._bind_draw_path_function (renderer ) as draw_path :
4152
4155
4153
4156
# FIXME : dpi_cor is for the dpi-dependency of the linewidth. There
4154
- # could be room for improvement.
4155
- self .set_dpi_cor (renderer .points_to_pixels (1. ))
4157
+ # could be room for improvement. Maybe get_path_in_displaycoord
4158
+ # could take a renderer argument, but get_path should be adapted
4159
+ # too.
4160
+ self ._dpi_cor = renderer .points_to_pixels (1. )
4156
4161
path , fillable = self .get_path_in_displaycoord ()
4157
4162
4158
4163
if not np .iterable (fillable ):
@@ -4175,6 +4180,7 @@ def __str__(self):
4175
4180
(self .xy1 [0 ], self .xy1 [1 ], self .xy2 [0 ], self .xy2 [1 ])
4176
4181
4177
4182
@docstring .dedent_interpd
4183
+ @cbook ._delete_parameter ("3.4" , "dpi_cor" )
4178
4184
def __init__ (self , xyA , xyB , coordsA , coordsB = None ,
4179
4185
axesA = None , axesB = None ,
4180
4186
arrowstyle = "-" ,
@@ -4269,8 +4275,8 @@ def __init__(self, xyA, xyB, coordsA, coordsB=None,
4269
4275
mutation_scale = mutation_scale ,
4270
4276
mutation_aspect = mutation_aspect ,
4271
4277
clip_on = clip_on ,
4272
- dpi_cor = dpi_cor ,
4273
4278
** kwargs )
4279
+ self ._dpi_cor = dpi_cor
4274
4280
4275
4281
# if True, draw annotation only if self.xy is inside the axes
4276
4282
self ._annotation_clip = None
@@ -4352,7 +4358,7 @@ def get_annotation_clip(self):
4352
4358
4353
4359
def get_path_in_displaycoord (self ):
4354
4360
"""Return the mutated path of the arrow in display coordinates."""
4355
- dpi_cor = self .get_dpi_cor ()
4361
+ dpi_cor = self ._dpi_cor
4356
4362
posA = self ._get_xy (self .xy1 , self .coords1 , self .axesA )
4357
4363
posB = self ._get_xy (self .xy2 , self .coords2 , self .axesB )
4358
4364
path = self .get_connectionstyle ()(
0 commit comments