@@ -3215,7 +3215,7 @@ class _Bracket(_Base):
3215
3215
def __init__ (self , bracketA = None , bracketB = None ,
3216
3216
widthA = 1. , widthB = 1. ,
3217
3217
lengthA = 0.2 , lengthB = 0.2 ,
3218
- angleA = None , angleB = None ,
3218
+ angleA = 0 , angleB = 0 ,
3219
3219
scaleA = None , scaleB = None ):
3220
3220
self .bracketA , self .bracketB = bracketA , bracketB
3221
3221
self .widthA , self .widthB = widthA , widthB
@@ -3241,7 +3241,7 @@ def _get_bracket(self, x0, y0,
3241
3241
Path .LINETO ,
3242
3242
Path .LINETO ]
3243
3243
3244
- if angle is not None :
3244
+ if angle :
3245
3245
trans = transforms .Affine2D ().rotate_deg_around (x0 , y0 , angle )
3246
3246
vertices_arrow = trans .transform (vertices_arrow )
3247
3247
@@ -3298,32 +3298,17 @@ class BracketAB(_Bracket):
3298
3298
"""An arrow with outward square brackets at both ends."""
3299
3299
3300
3300
def __init__ (self ,
3301
- widthA = 1. , lengthA = 0.2 , angleA = None ,
3302
- widthB = 1. , lengthB = 0.2 , angleB = None ):
3301
+ widthA = 1. , lengthA = 0.2 , angleA = 0 ,
3302
+ widthB = 1. , lengthB = 0.2 , angleB = 0 ):
3303
3303
"""
3304
3304
Parameters
3305
3305
----------
3306
- widthA : float, default: 1.0
3306
+ widthA, widthB : float, default: 1.0
3307
3307
Width of the bracket.
3308
-
3309
- lengthA : float, default: 0.2
3308
+ lengthA, lengthB : float, default: 0.2
3310
3309
Length of the bracket.
3311
-
3312
- angleA : float, default: None
3313
- Angle, in degrees, between the bracket and the line. Zero is
3314
- perpendicular to the line, and positive measures
3315
- counterclockwise.
3316
-
3317
- widthB : float, default: 1.0
3318
- Width of the bracket.
3319
-
3320
- lengthB : float, default: 0.2
3321
- Length of the bracket.
3322
-
3323
- angleB : float, default: None
3324
- Angle, in degrees, between the bracket and the line. Zero is
3325
- perpendicular to the line, and positive measures
3326
- counterclockwise.
3310
+ angleA, angleB : float, default: 0 degrees
3311
+ Angle between the bracket and the line (counterclockwise).
3327
3312
"""
3328
3313
super ().__init__ (True , True ,
3329
3314
widthA = widthA , lengthA = lengthA , angleA = angleA ,
@@ -3333,18 +3318,16 @@ def __init__(self,
3333
3318
class BracketA (_Bracket ):
3334
3319
"""An arrow with an outward square bracket at its start."""
3335
3320
3336
- def __init__ (self , widthA = 1. , lengthA = 0.2 , angleA = None ):
3321
+ def __init__ (self , widthA = 1. , lengthA = 0.2 , angleA = 0 ):
3337
3322
"""
3338
3323
Parameters
3339
3324
----------
3340
3325
widthA : float, default: 1.0
3341 3326
Width of the bracket.
3342
-
3343
3327
lengthA : float, default: 0.2
3344
3328
Length of the bracket.
3345
-
3346
- angleA : float, default: None
3347
- Angle between the bracket and the line.
3329
+ angleA : float, default: 0 degrees
3330
+ Angle between the bracket and the line (counterclockwise).
3348
3331
"""
3349
3332
super ().__init__ (True , None ,
3350
3333
widthA = widthA , lengthA = lengthA , angleA = angleA )
@@ -3359,14 +3342,10 @@ def __init__(self, widthB=1., lengthB=0.2, angleB=None):
3359
3342
----------
3360
3343
widthB : float, default: 1.0
3361
3344
Width of the bracket.
3362
-
3363
3345
lengthB : float, default: 0.2
3364
3346
Length of the bracket.
3365
-
3366
- angleB : float, default: None
3367
- Angle, in degrees, between the bracket and the line. Zero is
3368
- perpendicular to the line, and positive measures
3369
- counterclockwise.
3347
+ angleB : float, default: 0 degrees
3348
+ Angle between the bracket and the line (counterclockwise).
3370
3349
"""
3371
3350
super ().__init__ (None , True ,
3372
3351
widthB = widthB , lengthB = lengthB , angleB = angleB )
@@ -3381,21 +3360,10 @@ def __init__(self,
3381
3360
"""
3382
3361
Parameters
3383
3362
----------
3384
- widthA : float, default: 1.0
3363
+ widthA, widthB : float, default: 1.0
3385
3364
Width of the bracket.
3386
-
3387
- angleA : float, default: None
3388
- Angle, in degrees, between the bracket and the line. Zero is
3389
- perpendicular to the line, and positive measures
3390
- counterclockwise.
3391
-
3392
- widthB : float, default: 1.0
3393
- Width of the bracket.
3394
-
3395
- angleB : float, default: None
3396
- Angle, in degrees, between the bracket and the line. Zero is
3397
- perpendicular to the line, and positive measures
3398
- counterclockwise.
3365
+ angleA, angleB : float, default: 0 degrees
3366
+ Angle between the bracket and the line (counterclockwise).
3399
3367
"""
3400
3368
super ().__init__ (True , True ,
3401
3369
widthA = widthA , lengthA = 0 , angleA = angleA ,
0 commit comments