@@ -3470,7 +3470,7 @@ class _Bracket(_Base):
3470
3470
def __init__ (self , bracketA = None , bracketB = None ,
3471
3471
widthA = 1. , widthB = 1. ,
3472
3472
lengthA = 0.2 , lengthB = 0.2 ,
3473
- angleA = None , angleB = None ,
3473
+ angleA = 0 , angleB = 0 ,
3474
3474
scaleA = None , scaleB = None ):
3475
3475
self .bracketA , self .bracketB = bracketA , bracketB
3476
3476
self .widthA , self .widthB = widthA , widthB
@@ -3496,7 +3496,7 @@ def _get_bracket(self, x0, y0,
3496
3496
Path .LINETO ,
3497
3497
Path .LINETO ]
3498
3498
3499
- if angle is not None :
3499
+ if angle :
3500
3500
trans = transforms .Affine2D ().rotate_deg_around (x0 , y0 , angle )
3501
3501
vertices_arrow = trans .transform (vertices_arrow )
3502
3502
@@ -3553,32 +3553,18 @@ class BracketAB(_Bracket):
3553
3553
"""An arrow with outward square brackets at both ends."""
3554
3554
3555
3555
def __init__ (self ,
3556
- widthA = 1. , lengthA = 0.2 , angleA = None ,
3557
- widthB = 1. , lengthB = 0.2 , angleB = None ):
3556
+ widthA = 1. , lengthA = 0.2 , angleA = 0 ,
3557
+ widthB = 1. , lengthB = 0.2 , angleB = 0 ):
3558
3558
"""
3559
3559
Parameters
3560
3560
----------
3561
- widthA : float, default: 1.0
3561
+ widthA, widthB : float, default: 1.0
3562
3562
Width of the bracket.
3563
-
3564
- lengthA : float, default: 0.2
3563
+ lengthA, lengthB : float, default: 0.2
3565
3564
Length of the bracket.
3566
-
3567
- angleA : float, default: None
3568
- Angle, in degrees, between the bracket and the line. Zero is
3569
- perpendicular to the line, and positive measures
3570
- counterclockwise.
3571
-
3572
- widthB : float, default: 1.0
3573
- Width of the bracket.
3574
-
3575
- lengthB : float, default: 0.2
3576
- Length of the bracket.
3577
-
3578
- angleB : float, default: None
3579
- Angle, in degrees, between the bracket and the line. Zero is
3580
- perpendicular to the line, and positive measures
3581
- counterclockwise.
3565
+ angleA, angleB : float, default: 0 degrees
3566
+ Orientation of the bracket, as a counterclockwise angle.
3567
+ 0 degrees means perpendicular to the line.
3582
3568
"""
3583
3569
super ().__init__ (True , True ,
3584
3570
widthA = widthA , lengthA = lengthA , angleA = angleA ,
@@ -3588,18 +3574,17 @@ def __init__(self,
3588
3574
class BracketA (_Bracket ):
3589
3575
"""An arrow with an outward square bracket at its start."""
3590
3576
3591
- def __init__ (self , widthA = 1. , lengthA = 0.2 , angleA = None ):
3577
+ def __init__ (self , widthA = 1. , lengthA = 0.2 , angleA = 0 ):
3592
3578
"""
3593
3579
Parameters
3594
3580
----------
3595
3581
widthA : float, default: 1.0
3596
3582
Width of the bracket.
3597
-
3598
3583
lengthA : float, default: 0.2
3599
3584
Length of the bracket.
3600
-
3601
- angleA : float, default: None
3602
- Angle between the bracket and the line.
3585
+ angleA : float, default: 0 degrees
3586
+ Orientation of the bracket, as a counterclockwise angle.
3587
+ 0 degrees means perpendicular to the line.
3603
3588
"""
3604
3589
super ().__init__ (True , None ,
3605
3590
widthA = widthA , lengthA = lengthA , angleA = angleA )
@@ -3614,14 +3599,11 @@ def __init__(self, widthB=1., lengthB=0.2, angleB=None):
3614
3599
----------
3615
3600
widthB : float, default: 1.0
3616
3601
Width of the bracket.
3617
-
3618
3602
lengthB : float, default: 0.2
3619
3603
Length of the bracket.
3620
-
3621
- angleB : float, default: None
3622
- Angle, in degrees, between the bracket and the line. Zero is
3623
- perpendicular to the line, and positive measures
3624
- counterclockwise.
3604
+ angleB : float, default: 0 degrees
3605
+ Orientation of the bracket, as a counterclockwise angle.
3606
+ 0 degrees means perpendicular to the line.
3625
3607
"""
3626
3608
super ().__init__ (None , True ,
3627
3609
widthB = widthB , lengthB = lengthB , angleB = angleB )
@@ -3636,21 +3618,11 @@ def __init__(self,
3636
3618
"""
3637
3619
Parameters
3638
3620
----------
3639
- widthA : float, default: 1.0
3621
+ widthA, widthB : float, default: 1.0
3640
3622
Width of the bracket.
3641
-
3642
- angleA : float, default: None
3643
- Angle, in degrees, between the bracket and the line. Zero is
3644
- perpendicular to the line, and positive measures
3645
- counterclockwise.
3646
-
3647
- widthB : float, default: 1.0
3648
- Width of the bracket.
3649
-
3650
- angleB : float, default: None
3651
- Angle, in degrees, between the bracket and the line. Zero is
3652
- perpendicular to the line, and positive measures
3653
- counterclockwise.
3623
+ angleA, angleB : float, default: 0 degrees
3624
+ Orientation of the bracket, as a counterclockwise angle.
3625
+ 0 degrees means perpendicular to the line.
3654
3626
"""
3655
3627
super ().__init__ (True , True ,
3656
3628
widthA = widthA , lengthA = 0 , angleA = angleA ,
0 commit comments