@@ -3207,7 +3207,7 @@ def __init__(self, bracketA=None, bracketB=None,
32073207 self .scaleA , self .scaleB = scaleA , scaleB
32083208
32093209 def _get_bracket (self , x0 , y0 ,
3210- cos_t , sin_t , width , length ):
3210+ cos_t , sin_t , width , length , angle ):
32113211
32123212 # arrow from x0, y0 to x1, y1
32133213 from matplotlib .bezier import get_normal_points
@@ -3224,6 +3224,10 @@ def _get_bracket(self, x0, y0,
32243224 Path .LINETO ,
32253225 Path .LINETO ]
32263226
3227+ if angle is not None :
3228+ trans = transforms .Affine2D ().rotate_deg_around (x0 , y0 , angle )
3229+ vertices_arrow = trans .transform (vertices_arrow )
3230+
32273231 return vertices_arrow , codes_arrow
32283232
32293233 def transmute (self , path , mutation_size , linewidth ):
@@ -3246,7 +3250,8 @@ def transmute(self, path, mutation_size, linewidth):
32463250 cos_t , sin_t = get_cos_sin (x1 , y1 , x0 , y0 )
32473251 verticesA , codesA = self ._get_bracket (x0 , y0 , cos_t , sin_t ,
32483252 self .widthA * scaleA ,
3249- self .lengthA * scaleA )
3253+ self .lengthA * scaleA ,
3254+ self .angleA )
32503255 vertices_list .append (verticesA )
32513256 codes_list .append (codesA )
32523257
@@ -3259,7 +3264,8 @@ def transmute(self, path, mutation_size, linewidth):
32593264 cos_t , sin_t = get_cos_sin (x1 , y1 , x0 , y0 )
32603265 verticesB , codesB = self ._get_bracket (x0 , y0 , cos_t , sin_t ,
32613266 self .widthB * scaleB ,
3262- self .lengthB * scaleB )
3267+ self .lengthB * scaleB ,
3268+ self .angleB )
32633269 vertices_list .append (verticesB )
32643270 codes_list .append (codesB )
32653271
0 commit comments