@@ -4020,6 +4020,9 @@ def __init__(self, posA=None, posB=None,
40204020 -----
40214021 Valid kwargs are:
40224022 %(Patch)s
4023+
4024+ In contrast to other patches, the default ``capstyle`` and
4025+ ``joinstyle`` for `FancyArrowPatch` are set to ``"round"``.
40234026 """
40244027 if arrow_transmuter is not None :
40254028 cbook .warn_deprecated (
@@ -4035,6 +4038,10 @@ def __init__(self, posA=None, posB=None,
40354038 ' and will be removed in Matplotlib 3.1' ),
40364039 name = 'connector' ,
40374040 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+
40384045 Patch .__init__ (self , ** kwargs )
40394046
40404047 if posA is not None and posB is not None and path is None :
@@ -4284,9 +4291,7 @@ def draw(self, renderer):
42844291 if not self .get_visible ():
42854292 return
42864293
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 :
42904295
42914296 # FIXME : dpi_cor is for the dpi-dependency of the linewidth. There
42924297 # could be room for improvement.
0 commit comments