@@ -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,18 @@ 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
+ Orientation of the bracket, as a counterclockwise angle.
3312
+ 0 degrees means perpendicular to the line.
3327
3313
"""
3328
3314
super ().__init__ (True , True ,
3329
3315
widthA = widthA , lengthA = lengthA , angleA = angleA ,
@@ -3333,18 +3319,17 @@ def __init__(self,
3333
3319
class BracketA (_Bracket ):
3334
3320
"""An arrow with an outward square bracket at its start."""
3335
3321
3336
- def __init__ (self , widthA = 1. , lengthA = 0.2 , angleA = None ):
3322
+ def __init__ (self , widthA = 1. , lengthA = 0.2 , angleA = 0 ):
3337
3323
"""
3338
3324
10000
Parameters
3339
3325
----------
3340
3326
widthA : float, default: 1.0
3341
3327
Width of the bracket.
3342
-
3343
3328
lengthA : float, default: 0.2
3344
3329
Length of the bracket.
3345
-
3346
- angleA : float, default: None
3347
- Angle between the bracket and the line.
3330
+ angleA : float, default: 0 degrees
3331
+ Orientation of the bracket, as a counterclockwise angle.
3332
+ 0 degrees means perpendicular to the line.
3348
3333
"""
3349
3334
super ().__init__ (True , None ,
3350
3335
widthA = widthA , lengthA = lengthA , angleA = angleA )
@@ -3359,14 +3344,11 @@ def __init__(self, widthB=1., lengthB=0.2, angleB=None):
3359
3344
----------
3360
3345
widthB : float, default: 1.0
3361
3346
Width of the bracket.
3362
-
3363
3347
lengthB : float, default: 0.2
3364
3348
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.
3349
+ angleB : float, default: 0 degrees
3350
+ Orientation of the bracket, as a counterclockwise angle.
3351
+ 0 degrees means perpendicular to the line.
3370
3352
"""
3371
3353
super ().__init__ (None , True ,
3372
3354
widthB = widthB , lengthB = lengthB , angleB = angleB )
@@ -3381,21 +3363,11 @@ def __init__(self,
3381
3363
"""
3382
3364
Parameters
3383
3365
----------
3384
- widthA : float, default: 1.0
3366
+ widthA, widthB : float, default: 1.0
3385
3367
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.
3368
+ angleA, angleB : float, default: 0 degrees
3369
+ Orientation of the bracket, as a counterclockwise angle.
3370
+ 0 degrees means perpendicular to the line.
3399
3371
"""
3400
3372
super ().__init__ (True , True ,
3401
3373
widthA = widthA , lengthA = 0 , angleA = angleA ,
0 commit comments