@@ -3207,7 +3207,7 @@ def __init__(self, bracketA=None, bracketB=None,
3207
3207
self .scaleA , self .scaleB = scaleA , scaleB
3208
3208
3209
3209
def _get_bracket (self , x0 , y0 ,
3210
- cos_t , sin_t , width , length ):
3210
+ cos_t , sin_t , width , length , angle ):
3211
3211
3212
3212
# arrow from x0, y0 to x1, y1
3213
3213
from matplotlib .bezier import get_normal_points
@@ -3224,6 +3224,10 @@ def _get_bracket(self, x0, y0,
3224
3224
Path .LINETO ,
3225
3225
Path .LINETO ]
3226
3226
3227
+ if angle is not None :
3228
+ trans = transforms .Affine2D ().rotate_deg_around (x0 , y0 , angle )
3229
+ vertices_arrow = trans .transform (vertices_arrow )
3230
+
3227
3231
return vertices_arrow , codes_arrow
3228
3232
3229
3233
def transmute (self , path , mutation_size , linewidth ):
@@ -3246,7 +3250,8 @@ def transmute(self, path, mutation_size, linewidth):
3246
3250
cos_t , sin_t = get_cos_sin (x1 , y1 , x0 , y0 )
3247
3251
verticesA , codesA = self ._get_bracket (x0 , y0 , cos_t , sin_t ,
3248
3252
self .widthA * scaleA ,
3249
- self .lengthA * scaleA )
3253
+ self .lengthA * scaleA ,
3254
+ self .angleA )
3250
3255
vertices_list .append (verticesA )
3251
3256
codes_list .append (codesA )
3252
3257
@@ -3259,7 +3264,8 @@ def transmute(self, path, mutation_size, linewidth):
3259
3264
cos_t , sin_t = get_cos_sin (x1 , y1 , x0 , y0 )
3260
3265
verticesB , codesB = self ._get_bracket (x0 , y0 , cos_t , sin_t ,
3261
3266
self .widthB * scaleB ,
3262
- self .lengthB * scaleB )
3267
+ self .lengthB * scaleB ,
3268
+ self .angleB )
3263
3269
vertices_list .append (verticesB )
3264
3270
codes_list .append (codesB )
3265
3271
@@ -3287,7 +3293,9 @@ def __init__(self,
3287
3293
Length of the bracket.
3288
3294
3289
3295
angleA : float, default: None
3290
- Angle between the bracket and the line.
3296
+ Angle, in degrees, between the bracket and the line. Zero is
3297
+ perpendicular to the line, and positive measures
3298
+ counterclockwise.
3291
3299
3292
3300
widthB : float, default: 1.0
3293
3301
Width of the bracket.
@@ -3296,7 +3304,9 @@ def __init__(self,
3296
3304
Length of the bracket.
3297
3305
3298
3306
angleB : float, default: None
3299
- Angle between the bracket and the line.
3307
+ Angle, in degrees, between the bracket and the line. Zero is
3308
+ perpendicular to the line, and positive measures
3309
+ counterclockwise.
3300
3310
"""
3301
3311
super ().__init__ (True , True ,
3302
3312
widthA = widthA , lengthA = lengthA , angleA = angleA ,
@@ -3337,7 +3347,9 @@ def __init__(self, widthB=1., lengthB=0.2, angleB=None):
3337
3347
Length of the bracket.
3338
3348
3339
3349
angleB : float, default: None
3340
- Angle between the bracket and the line.
3350
+ Angle, in degrees, between the bracket and the line. Zero is
3351
+ perpendicular to the line, and positive measures
3352
+ counterclockwise.
3341
3353
"""
3342
3354
super ().__init__ (None , True ,
3343
3355
widthB = widthB , lengthB = lengthB , angleB = angleB )
@@ -3356,13 +3368,17 @@ def __init__(self,
3356
3368
Width of the bracket.
3357
3369
3358
3370
angleA : float, default: None
3359
- Angle between the bracket and the line.
3371
+ Angle, in degrees, between the bracket and the line. Zero is
3372
+ perpendicular to the line, and positive measures
3373
+ counterclockwise.
3360
3374
3361
3375
widthB : float, default: 1.0
3362
3376
Width of the bracket.
3363
3377
3364
3378
angleB : float, default: None
3365
- Angle between the bracket and the line.
3379
+ Angle, in degrees, between the bracket and the line. Zero is
3380
+ perpendicular to the line, and positive measures
3381
+ counterclockwise.
3366
3382
"""
3367
3383
super ().__init__ (True , True ,
3368
3384
widthA = widthA , lengthA = 0 , angleA = angleA ,
0 commit comments