@@ -4020,6 +4020,9 @@ def __init__(self, posA=None, posB=None,
4020
4020
-----
4021
4021
Valid kwargs are:
4022
4022
%(Patch)s
4023
+
4024
+ In contrast to other patches, the default ``capstyle`` and
4025
+ ``joinstyle`` for `FancyArrowPatch` are set to ``"round"``.
4023
4026
"""
4024
4027
if arrow_transmuter is not None :
4025
4028
cbook .warn_deprecated (
@@ -4035,6 +4038,10 @@ def __init__(self, posA=None, posB=None,
4035
4038
' and will be removed in Matplotlib 3.1' ),
4036
4039
name = 'connector' ,
4037
4040
obj_type = 'keyword argument' )
4041
+ # Traditionally, the cap- and joinstyle for FancyArrowPatch are round
4042
+ kwargs .setdefault ("joinstyle" , "round" )
4043
+ kwargs .setdefault ("capstyle" , "round" )
4044
+
4038
4045
Patch .__init__ (self , ** kwargs )
4039
4046
4040
4047
if posA is not None and posB is not None and path is None :
@@ -4284,9 +4291,7 @@ def draw(self, renderer):
4284
4291
if not self .get_visible ():
4285
4292
return
4286
4293
4287
- # FancyArrowPatch has traditionally forced the capstyle and joinstyle.
4288
- with cbook ._setattr_cm (self , _capstyle = 'round' , _joinstyle = 'round' ), \
4289
- self ._bind_draw_path_function (renderer ) as draw_path :
4294
+ with self ._bind_draw_path_function (renderer ) as draw_path :
4290
4295
4291
4296
# FIXME : dpi_cor is for the dpi-dependency of the linewidth. There
4292
4297
# could be room for improvement.
0 commit comments