diff --git a/lib/matplotlib/patches.py b/lib/matplotlib/patches.py index 0c8c8ed3edf2..f93643a56b37 100644 --- a/lib/matplotlib/patches.py +++ b/lib/matplotlib/patches.py @@ -3424,11 +3424,13 @@ class CurveA(_Curve): def __init__(self, head_length=.4, head_width=.2): """ - *head_length* - length of the arrow head + Parameters + ---------- + head_length : float, optional, default : 0.4 + Length of the arrow head - *head_width* - width of the arrow head + head_width : float, optional, default : 0.2 + Width of the arrow head """ super(ArrowStyle.CurveA, self).__init__( @@ -3444,11 +3446,13 @@ class CurveB(_Curve): def __init__(self, head_length=.4, head_width=.2): """ - *head_length* - length of the arrow head + Parameters + ---------- + head_length : float, optional, default : 0.4 + Length of the arrow head - *head_width* - width of the arrow head + head_width : float, optional, default : 0.2 + Width of the arrow head """ super(ArrowStyle.CurveB, self).__init__( @@ -3464,11 +3468,13 @@ class CurveAB(_Curve): def __init__(self, head_length=.4, head_width=.2): """ - *head_length* - length of the arrow head + Parameters + ---------- + head_length : float, optional, default : 0.4 + Length of the arrow head - *head_width* - width of the arrow head + head_width : float, optional, default : 0.2 + Width of the arrow head """ super(ArrowStyle.CurveAB, self).__init__( @@ -3484,11 +3490,13 @@ class CurveFilledA(_Curve): def __init__(self, head_length=.4, head_width=.2): """ - *head_length* - length of the arrow head + Parameters + ---------- + head_length : float, optional, default : 0.4 + Length of the arrow head - *head_width* - width of the arrow head + head_width : float, optional, default : 0.2 + Width of the arrow head """ super(ArrowStyle.CurveFilledA, self).__init__( @@ -3505,11 +3513,13 @@ class CurveFilledB(_Curve): def __init__(self, head_length=.4, head_width=.2): """ - *head_length* - length of the arrow head + Parameters + ---------- + head_length : float, optional, default : 0.4 + Length of the arrow head - *head_width* - width of the arrow head + head_width : float, optional, default : 0.2 + Width of the arrow head """ super(ArrowStyle.CurveFilledB, self).__init__( @@ -3521,17 +3531,18 @@ def __init__(self, head_length=.4, head_width=.2): class CurveFilledAB(_Curve): """ - An arrow with filled triangle heads both at the begin and the end - point. + An arrow with filled triangle heads at both ends. """ def __init__(self, head_length=.4, head_width=.2): """ - *head_length* - length of the arrow head + Parameters + ---------- + head_length : float, optional, default : 0.4 + Length of the arrow head - *head_width* - width of the arrow head + head_width : float, optional, default : 0.2 + Width of the arrow head """ super(ArrowStyle.CurveFilledAB, self).__init__( @@ -3620,30 +3631,32 @@ def transmute(self, path, mutation_size, linewidth): class BracketAB(_Bracket): """ - An arrow with a bracket(]) at both ends. + An arrow with a bracket(]) at both ends. """ def __init__(self, widthA=1., lengthA=0.2, angleA=None, widthB=1., lengthB=0.2, angleB=None): """ - *widthA* - width of the bracket + Parameters + ---------- + widthA : float, optional, default : 1.0 + Width of the bracket - *lengthA* - length of the bracket + lengthA : float, optional, default : 0.2 + Length of the bracket - *angleA* - angle between the bracket and the line + angleA : float, optional, default : None + Angle between the bracket and the line - *widthB* - width of the bracket + widthB : float, optional, default : 1.0 + Width of the bracket - *lengthB* - length of the bracket + lengthB : float, optional, default : 0.2 + Length of the bracket - *angleB* - angle between the bracket and the line + angleB : float, optional, default : None + Angle between the bracket and the line """ super(ArrowStyle.BracketAB, self).__init__( @@ -3660,14 +3673,16 @@ class BracketA(_Bracket): def __init__(self, widthA=1., lengthA=0.2, angleA=None): """ - *widthA* - width of the bracket + Parameters + ---------- + widthA : float, optional, default : 1.0 + Width of the bracket - *lengthA* - length of the bracket + lengthA : float, optional, default : 0.2 + Length of the bracket - *angleA* - angle between the bracket and the line + angleA : float, optional, default : None + Angle between the bracket and the line """ super(ArrowStyle.BracketA, self).__init__(True, None, @@ -3684,14 +3699,16 @@ class BracketB(_Bracket): def __init__(self, widthB=1., lengthB=0.2, angleB=None): """ - *widthB* - width of the bracket + Parameters + ---------- + widthB : float, optional, default : 1.0 + Width of the bracket - *lengthB* - length of the bracket + lengthB : float, optional, default : 0.2 + Length of the bracket - *angleB* - angle between the bracket and the line + angleB : float, optional, default : None + Angle between the bracket and the line """ super(ArrowStyle.BracketB, self).__init__(None, True, @@ -3710,23 +3727,19 @@ def __init__(self, widthA=1., angleA=None, widthB=1., angleB=None): """ - *widthA* - width of the bracket - - *lengthA* - length of the bracket - - *angleA* - angle between the bracket and the line + Parameters + ---------- + widthA : float, optional, default : 1.0 + Width of the bracket - *widthB* - width of the bracket + angleA : float, optional, default : None + Angle between the bracket and the line - *lengthB* - length of the bracket + widthB : float, optional, default : 1.0 + Width of the bracket - *angleB* - angle between the bracket and the line + angleB : float, optional, default : None + Angle between the bracket and the line """ super(ArrowStyle.BarAB, self).__init__( @@ -3742,15 +3755,16 @@ class Simple(_Base): def __init__(self, head_length=.5, head_width=.5, tail_width=.2): """ - *head_length* - length of the arrow head - - *head_with* - width of the arrow head + Parameters + ---------- + head_length : float, optional, default : 0.5 + Length of the arrow head - *tail_width* - width of the arrow tail + head_width : float, optional, default : 0.5 + Width of the arrow head + tail_width : float, optional, default : 0.2 + Width of the arrow tail """ self.head_length, self.head_width, self.tail_width = \ @@ -3828,15 +3842,16 @@ class Fancy(_Base): def __init__(self, head_length=.4, head_width=.4, tail_width=.4): """ - *head_length* - length of the arrow head - - *head_with* - width of the arrow head + Parameters + ---------- + head_length : float, optional, default : 0.4 + Length of the arrow head - *tail_width* - width of the arrow tail + head_width : float, optional, default : 0.4 + Width of the arrow head + tail_width : float, optional, default : 0.4 + Width of the arrow tail """ self.head_length, self.head_width, self.tail_width = \ @@ -3928,16 +3943,17 @@ class Wedge(_Base): Wedge(?) shape. Only works with a quadratic bezier curve. The begin point has a width of the tail_width and the end point has a width of 0. At the middle, the width is shrink_factor*tail_width. - """ def __init__(self, tail_width=.3, shrink_factor=0.5): """ - *tail_width* - width of the tail + Parameters + ---------- + tail_width : float, optional, default : 0.3 + Width of the tail - *shrink_factor* - fraction of the arrow width at the middle point + shrink_factor : float, optional, default : 0.5 + Fraction of the arrow width at the middle point """ self.tail_width = tail_width