@@ -2175,21 +2175,16 @@ def transform(renderer) -> Transform
2175
2175
Text .__init__ (self , x , y , text )
2176
2176
2177
2177
self .arrowprops = arrowprops
2178
-
2179
2178
if arrowprops is not None :
2179
+ arrowprops = arrowprops .copy ()
2180
2180
if "arrowstyle" in arrowprops :
2181
- arrowprops = self .arrowprops .copy ()
2182
2181
self ._arrow_relpos = arrowprops .pop ("relpos" , (0.5 , 0.5 ))
2183
2182
else :
2184
2183
# modified YAArrow API to be used with FancyArrowPatch
2185
- shapekeys = ('width' , 'headwidth' , 'headlength' ,
2186
- 'shrink' , 'frac' )
2187
- arrowprops = dict ()
2188
- for key , val in self .arrowprops .items ():
2189
- if key not in shapekeys :
2190
- arrowprops [key ] = val # basic Patch properties
2191
- self .arrow_patch = FancyArrowPatch ((0 , 0 ), (1 , 1 ),
2192
- ** arrowprops )
2184
+ for key in [
2185
+ 'width' , 'headwidth' , 'headlength' , 'shrink' , 'frac' ]:
2186
+ arrowprops .pop (key , None )
2187
+ self .arrow_patch = FancyArrowPatch ((0 , 0 ), (1 , 1 ), ** arrowprops )
2193
2188
else :
2194
2189
self .arrow_patch = None
2195
2190
0 commit comments