From bd1e4d753f29bbb3de9ac6379b38f00d1a8c2552 Mon Sep 17 00:00:00 2001 From: patniharshit Date: Mon, 20 Mar 2017 00:04:21 +0530 Subject: [PATCH 1/5] Make ArrowStyle docstrings numpydoc compatible --- lib/matplotlib/patches.py | 223 ++++++++++++++++++++------------------ 1 file changed, 116 insertions(+), 107 deletions(-) diff --git a/lib/matplotlib/patches.py b/lib/matplotlib/patches.py index 0c8c8ed3edf2..782bb7e7a171 100644 --- a/lib/matplotlib/patches.py +++ b/lib/matplotlib/patches.py @@ -3407,8 +3407,7 @@ def transmute(self, path, mutation_size, linewidth): return _path, _fillable class Curve(_Curve): - """ - A simple curve without any arrow head. + """A simple curve without any arrow head. """ def __init__(self): @@ -3418,17 +3417,18 @@ def __init__(self): _style_list["-"] = Curve class CurveA(_Curve): - """ - An arrow with a head at its begin point. + """An arrow with a head at its begin point. """ def __init__(self, head_length=.4, head_width=.2): """ - *head_length* - length of the arrow head + Parameters + ---------- + head_length : float, optional + Length of the arrow head - *head_width* - width of the arrow head + head_width : float, optional + Width of the arrow head """ super(ArrowStyle.CurveA, self).__init__( @@ -3438,17 +3438,18 @@ def __init__(self, head_length=.4, head_width=.2): _style_list["<-"] = CurveA class CurveB(_Curve): - """ - An arrow with a head at its end point. + """An arrow with a head at its end point. """ def __init__(self, head_length=.4, head_width=.2): """ - *head_length* - length of the arrow head + Parameters + ---------- + head_length : float, optional + Length of the arrow head - *head_width* - width of the arrow head + head_width : float, optional + Width of the arrow head """ super(ArrowStyle.CurveB, self).__init__( @@ -3458,17 +3459,18 @@ def __init__(self, head_length=.4, head_width=.2): _style_list["->"] = CurveB class CurveAB(_Curve): - """ - An arrow with heads both at the begin and the end point. + """An arrow with heads both at the begin and the end point. """ def __init__(self, head_length=.4, head_width=.2): """ - *head_length* - length of the arrow head + Parameters + ---------- + head_length : float, optional + Length of the arrow head - *head_width* - width of the arrow head + head_width : float, optional + Width of the arrow head """ super(ArrowStyle.CurveAB, self).__init__( @@ -3478,17 +3480,18 @@ def __init__(self, head_length=.4, head_width=.2): _style_list["<->"] = CurveAB class CurveFilledA(_Curve): - """ - An arrow with filled triangle head at the begin. + """An arrow with filled triangle head at the begin. """ def __init__(self, head_length=.4, head_width=.2): """ - *head_length* - length of the arrow head + Parameters + ---------- + head_length : float, optional + Length of the arrow head - *head_width* - width of the arrow head + head_width : float, optional + Width of the arrow head """ super(ArrowStyle.CurveFilledA, self).__init__( @@ -3499,17 +3502,18 @@ def __init__(self, head_length=.4, head_width=.2): _style_list["<|-"] = CurveFilledA class CurveFilledB(_Curve): - """ - An arrow with filled triangle head at the end. + """An arrow with filled triangle head at the end. """ def __init__(self, head_length=.4, head_width=.2): """ - *head_length* - length of the arrow head + Parameters + ---------- + head_length : float, optional + Length of the arrow head - *head_width* - width of the arrow head + head_width : float, optional + Width of the arrow head """ super(ArrowStyle.CurveFilledB, self).__init__( @@ -3520,18 +3524,19 @@ def __init__(self, head_length=.4, head_width=.2): _style_list["-|>"] = CurveFilledB class CurveFilledAB(_Curve): - """ - An arrow with filled triangle heads both at the begin and the end + """An arrow with filled triangle heads both at the begin and the end point. """ def __init__(self, head_length=.4, head_width=.2): """ - *head_length* - length of the arrow head + Parameters + ---------- + head_length : float, optional + Length of the arrow head - *head_width* - width of the arrow head + head_width : float, optional + Width of the arrow head """ super(ArrowStyle.CurveFilledAB, self).__init__( @@ -3619,31 +3624,32 @@ def transmute(self, path, mutation_size, linewidth): return p, False 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 + Width of the bracket - *lengthA* - length of the bracket + lengthA : float, optional + Length of the bracket - *angleA* - angle between the bracket and the line + angleA : float, optional + Angle between the bracket and the line - *widthB* - width of the bracket + widthB : float, optional + Width of the bracket - *lengthB* - length of the bracket + lengthB : float, optional + Length of the bracket - *angleB* - angle between the bracket and the line + angleB : float, optional + Angle between the bracket and the line """ super(ArrowStyle.BracketAB, self).__init__( @@ -3654,20 +3660,21 @@ def __init__(self, _style_list["]-["] = BracketAB class BracketA(_Bracket): - """ - An arrow with a bracket(]) at its end. + """An arrow with a bracket(]) at its end. """ def __init__(self, widthA=1., lengthA=0.2, angleA=None): """ - *widthA* - width of the bracket + Parameters + ---------- + widthA : float, optional + Width of the bracket - *lengthA* - length of the bracket + lengthA : float, optional + Length of the bracket - *angleA* - angle between the bracket and the line + angleA : float, optional + Angle between the bracket and the line """ super(ArrowStyle.BracketA, self).__init__(True, None, @@ -3678,20 +3685,21 @@ def __init__(self, widthA=1., lengthA=0.2, angleA=None): _style_list["]-"] = BracketA class BracketB(_Bracket): - """ - An arrow with a bracket([) at its end. + """An arrow with a bracket([) at its end. """ def __init__(self, widthB=1., lengthB=0.2, angleB=None): """ - *widthB* - width of the bracket + Parameters + ---------- + widthB : float, optional + Width of the bracket - *lengthB* - length of the bracket + lengthB : float, optional + Length of the bracket - *angleB* - angle between the bracket and the line + angleB : float, optional + Angle between the bracket and the line """ super(ArrowStyle.BracketB, self).__init__(None, True, @@ -3702,31 +3710,32 @@ def __init__(self, widthB=1., lengthB=0.2, angleB=None): _style_list["-["] = BracketB class BarAB(_Bracket): - """ - An arrow with a bar(|) at both ends. + """An arrow with a bar(|) at both ends. """ def __init__(self, widthA=1., angleA=None, widthB=1., angleB=None): """ - *widthA* - width of the bracket + Parameters + ---------- + widthA : float, optional + Width of the bracket - *lengthA* - length of the bracket + lengthA : int + Length of the bracket - *angleA* - angle between the bracket and the line + angleA : float, optional + Angle between the bracket and the line - *widthB* - width of the bracket + widthB : float, optional + Width of the bracket - *lengthB* - length of the bracket + lengthB : int + Length of the bracket - *angleB* - angle between the bracket and the line + angleB : float, optional + Angle between the bracket and the line """ super(ArrowStyle.BarAB, self).__init__( @@ -3736,21 +3745,21 @@ def __init__(self, _style_list["|-|"] = BarAB class Simple(_Base): - """ - A simple arrow. Only works with a quadratic bezier curve. + """A simple arrow. Only works with a quadratic bezier curve. """ 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 + Length of the arrow head - *tail_width* - width of the arrow tail + head_width : float, optional + Width of the arrow head + tail_width : float, optional + Width of the arrow tail """ self.head_length, self.head_width, self.tail_width = \ @@ -3822,21 +3831,21 @@ def transmute(self, path, mutation_size, linewidth): _style_list["simple"] = Simple class Fancy(_Base): - """ - A fancy arrow. Only works with a quadratic bezier curve. + """A fancy arrow. Only works with a quadratic bezier curve. """ 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 + Length of the arrow head - *tail_width* - width of the arrow tail + head_with : float, optional + Width of the arrow head + tail_width : float, optional + Width of the arrow tail """ self.head_length, self.head_width, self.tail_width = \ @@ -3928,16 +3937,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 + Width of the tail - *shrink_factor* - fraction of the arrow width at the middle point + shrink_factor : float, optional + Fraction of the arrow width at the middle point """ self.tail_width = tail_width @@ -3980,8 +3990,7 @@ def transmute(self, path, mutation_size, linewidth): class FancyArrowPatch(Patch): - """ - A fancy arrow patch. It draws an arrow using the :class:ArrowStyle. + """A fancy arrow patch. It draws an arrow using the :class:ArrowStyle. """ _edge_default = True From 0009035c35644481b0fa43aa04537bd154e893fa Mon Sep 17 00:00:00 2001 From: patniharshit Date: Mon, 20 Mar 2017 10:46:00 +0530 Subject: [PATCH 2/5] add default values and remove mixture of tabs and spaces --- lib/matplotlib/patches.py | 163 ++++++++++++++++++++------------------ 1 file changed, 88 insertions(+), 75 deletions(-) diff --git a/lib/matplotlib/patches.py b/lib/matplotlib/patches.py index 782bb7e7a171..cf71dab0d335 100644 --- a/lib/matplotlib/patches.py +++ b/lib/matplotlib/patches.py @@ -3407,7 +3407,8 @@ def transmute(self, path, mutation_size, linewidth): return _path, _fillable class Curve(_Curve): - """A simple curve without any arrow head. + """ + A simple curve without any arrow head. """ def __init__(self): @@ -3417,18 +3418,19 @@ def __init__(self): _style_list["-"] = Curve class CurveA(_Curve): - """An arrow with a head at its begin point. + """ + An arrow with a head at its begin point. """ def __init__(self, head_length=.4, head_width=.2): """ Parameters ---------- - head_length : float, optional + head_length : float, optional, default : .4 Length of the arrow head - head_width : float, optional - Width of the arrow head + head_width : float, optional, default : .2 + Width of the arrow head """ super(ArrowStyle.CurveA, self).__init__( @@ -3438,18 +3440,19 @@ def __init__(self, head_length=.4, head_width=.2): _style_list["<-"] = CurveA class CurveB(_Curve): - """An arrow with a head at its end point. + """ + An arrow with a head at its end point. """ def __init__(self, head_length=.4, head_width=.2): """ Parameters ---------- - head_length : float, optional + head_length : float, optional, default : .4 Length of the arrow head - head_width : float, optional - Width of the arrow head + head_width : float, optional, default : .2 + Width of the arrow head """ super(ArrowStyle.CurveB, self).__init__( @@ -3459,18 +3462,19 @@ def __init__(self, head_length=.4, head_width=.2): _style_list["->"] = CurveB class CurveAB(_Curve): - """An arrow with heads both at the begin and the end point. + """ + An arrow with heads both at the begin and the end point. """ def __init__(self, head_length=.4, head_width=.2): """ Parameters ---------- - head_length : float, optional + head_length : float, optional, default : .4 Length of the arrow head - head_width : float, optional - Width of the arrow head + head_width : float, optional, default : .2 + Width of the arrow head """ super(ArrowStyle.CurveAB, self).__init__( @@ -3480,18 +3484,19 @@ def __init__(self, head_length=.4, head_width=.2): _style_list["<->"] = CurveAB class CurveFilledA(_Curve): - """An arrow with filled triangle head at the begin. + """ + An arrow with filled triangle head at the begin. """ def __init__(self, head_length=.4, head_width=.2): """ Parameters ---------- - head_length : float, optional + head_length : float, optional, default : .4 Length of the arrow head - head_width : float, optional - Width of the arrow head + head_width : float, optional, default : .2 + Width of the arrow head """ super(ArrowStyle.CurveFilledA, self).__init__( @@ -3502,18 +3507,19 @@ def __init__(self, head_length=.4, head_width=.2): _style_list["<|-"] = CurveFilledA class CurveFilledB(_Curve): - """An arrow with filled triangle head at the end. + """ + An arrow with filled triangle head at the end. """ def __init__(self, head_length=.4, head_width=.2): """ Parameters ---------- - head_length : float, optional + head_length : float, optional, default : .4 Length of the arrow head - head_width : float, optional - Width of the arrow head + head_width : float, optional, default : .2 + Width of the arrow head """ super(ArrowStyle.CurveFilledB, self).__init__( @@ -3524,19 +3530,19 @@ def __init__(self, head_length=.4, head_width=.2): _style_list["-|>"] = CurveFilledB 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): """ Parameters ---------- - head_length : float, optional + head_length : float, optional, default : .4 Length of the arrow head - head_width : float, optional - Width of the arrow head + head_width : float, optional, default : .2 + Width of the arrow head """ super(ArrowStyle.CurveFilledAB, self).__init__( @@ -3624,7 +3630,8 @@ def transmute(self, path, mutation_size, linewidth): return p, False class BracketAB(_Bracket): - """An arrow with a bracket(]) at both ends. + """ + An arrow with a bracket(]) at both ends. """ def __init__(self, @@ -3633,23 +3640,23 @@ def __init__(self, """ Parameters ---------- - widthA : float, optional - Width of the bracket + widthA : float, optional, default : 1. + Width of the bracket - lengthA : float, optional + lengthA : float, optional, default : 0.2 Length of the bracket - angleA : float, optional - Angle between the bracket and the line + angleA : float, optional, default : None + Angle between the bracket and the line - widthB : float, optional - Width of the bracket + widthB : float, optional, default : 1. + Width of the bracket - lengthB : float, optional + lengthB : float, optional, default : 0.2 Length of the bracket - angleB : float, optional - 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,21 +3667,22 @@ def __init__(self, _style_list["]-["] = BracketAB class BracketA(_Bracket): - """An arrow with a bracket(]) at its end. + """ + An arrow with a bracket(]) at its end. """ def __init__(self, widthA=1., lengthA=0.2, angleA=None): """ Parameters ---------- - widthA : float, optional - Width of the bracket + widthA : float, optional, default : 1. + Width of the bracket - lengthA : float, optional + lengthA : float, optional, default : 0.2 Length of the bracket - angleA : float, optional - 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, @@ -3685,21 +3693,22 @@ def __init__(self, widthA=1., lengthA=0.2, angleA=None): _style_list["]-"] = BracketA class BracketB(_Bracket): - """An arrow with a bracket([) at its end. + """ + An arrow with a bracket([) at its end. """ def __init__(self, widthB=1., lengthB=0.2, angleB=None): """ Parameters ---------- - widthB : float, optional - Width of the bracket + widthB : float, optional, default : 1. + Width of the bracket - lengthB : float, optional + lengthB : float, optional, default : 0.2 Length of the bracket - angleB : float, optional - 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,7 +3719,8 @@ def __init__(self, widthB=1., lengthB=0.2, angleB=None): _style_list["-["] = BracketB class BarAB(_Bracket): - """An arrow with a bar(|) at both ends. + """ + An arrow with a bar(|) at both ends. """ def __init__(self, @@ -3719,23 +3729,23 @@ def __init__(self, """ Parameters ---------- - widthA : float, optional - Width of the bracket + widthA : float, optional, default : 1. + Width of the bracket lengthA : int Length of the bracket - angleA : float, optional - Angle between the bracket and the line + angleA : float, optional, default : None + Angle between the bracket and the line - widthB : float, optional - Width of the bracket + widthB : float, optional, default : 1. + Width of the bracket lengthB : int Length of the bracket - angleB : float, optional - Angle between the bracket and the line + angleB : float, optional, default : None + Angle between the bracket and the line """ super(ArrowStyle.BarAB, self).__init__( @@ -3745,21 +3755,22 @@ def __init__(self, _style_list["|-|"] = BarAB class Simple(_Base): - """A simple arrow. Only works with a quadratic bezier curve. + """ + A simple arrow. Only works with a quadratic bezier curve. """ def __init__(self, head_length=.5, head_width=.5, tail_width=.2): """ Parameters ---------- - head_length : float, optional + head_length : float, optional, default : .5 Length of the arrow head - head_width : float, optional - Width of the arrow head + head_width : float, optional, default : .5 + Width of the arrow head - tail_width : float, optional - Width of the arrow tail + tail_width : float, optional, default : .2 + Width of the arrow tail """ self.head_length, self.head_width, self.tail_width = \ @@ -3831,21 +3842,22 @@ def transmute(self, path, mutation_size, linewidth): _style_list["simple"] = Simple class Fancy(_Base): - """A fancy arrow. Only works with a quadratic bezier curve. + """ + A fancy arrow. Only works with a quadratic bezier curve. """ def __init__(self, head_length=.4, head_width=.4, tail_width=.4): """ Parameters ---------- - head_length : float, optional + head_length : float, optional, default : .4 Length of the arrow head - head_with : float, optional - Width of the arrow head + head_width : float, optional, default : .4 + Width of the arrow head - tail_width : float, optional - Width of the arrow tail + tail_width : float, optional, default : .4 + Width of the arrow tail """ self.head_length, self.head_width, self.tail_width = \ @@ -3943,11 +3955,11 @@ def __init__(self, tail_width=.3, shrink_factor=0.5): """ Parameters ---------- - tail_width : float, optional - Width of the tail + tail_width : float, optional, default : .3 + Width of the tail - shrink_factor : float, optional - 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 @@ -3990,7 +4002,8 @@ def transmute(self, path, mutation_size, linewidth): class FancyArrowPatch(Patch): - """A fancy arrow patch. It draws an arrow using the :class:ArrowStyle. + """ + A fancy arrow patch. It draws an arrow using the :class:ArrowStyle. """ _edge_default = True From b8ae472312f44a4a49d03a7b3563f86180537b55 Mon Sep 17 00:00:00 2001 From: patniharshit Date: Mon, 20 Mar 2017 23:32:13 +0530 Subject: [PATCH 3/5] add 0 with decimals --- lib/matplotlib/patches.py | 50 +++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/lib/matplotlib/patches.py b/lib/matplotlib/patches.py index cf71dab0d335..da9f6d86795d 100644 --- a/lib/matplotlib/patches.py +++ b/lib/matplotlib/patches.py @@ -3426,10 +3426,10 @@ def __init__(self, head_length=.4, head_width=.2): """ Parameters ---------- - head_length : float, optional, default : .4 + head_length : float, optional, default : 0.4 Length of the arrow head - head_width : float, optional, default : .2 + head_width : float, optional, default : 0.2 Width of the arrow head """ @@ -3448,10 +3448,10 @@ def __init__(self, head_length=.4, head_width=.2): """ Parameters ---------- - head_length : float, optional, default : .4 + head_length : float, optional, default : 0.4 Length of the arrow head - head_width : float, optional, default : .2 + head_width : float, optional, default : 0.2 Width of the arrow head """ @@ -3470,10 +3470,10 @@ def __init__(self, head_length=.4, head_width=.2): """ Parameters ---------- - head_length : float, optional, default : .4 + head_length : float, optional, default : 0.4 Length of the arrow head - head_width : float, optional, default : .2 + head_width : float, optional, default : 0.2 Width of the arrow head """ @@ -3492,10 +3492,10 @@ def __init__(self, head_length=.4, head_width=.2): """ Parameters ---------- - head_length : float, optional, default : .4 + head_length : float, optional, default : 0.4 Length of the arrow head - head_width : float, optional, default : .2 + head_width : float, optional, default : 0.2 Width of the arrow head """ @@ -3515,10 +3515,10 @@ def __init__(self, head_length=.4, head_width=.2): """ Parameters ---------- - head_length : float, optional, default : .4 + head_length : float, optional, default : 0.4 Length of the arrow head - head_width : float, optional, default : .2 + head_width : float, optional, default : 0.2 Width of the arrow head """ @@ -3538,10 +3538,10 @@ def __init__(self, head_length=.4, head_width=.2): """ Parameters ---------- - head_length : float, optional, default : .4 + head_length : float, optional, default : 0.4 Length of the arrow head - head_width : float, optional, default : .2 + head_width : float, optional, default : 0.2 Width of the arrow head """ @@ -3640,7 +3640,7 @@ def __init__(self, """ Parameters ---------- - widthA : float, optional, default : 1. + widthA : float, optional, default : 1.0 Width of the bracket lengthA : float, optional, default : 0.2 @@ -3649,7 +3649,7 @@ def __init__(self, angleA : float, optional, default : None Angle between the bracket and the line - widthB : float, optional, default : 1. + widthB : float, optional, default : 1.0 Width of the bracket lengthB : float, optional, default : 0.2 @@ -3675,7 +3675,7 @@ def __init__(self, widthA=1., lengthA=0.2, angleA=None): """ Parameters ---------- - widthA : float, optional, default : 1. + widthA : float, optional, default : 1.0 Width of the bracket lengthA : float, optional, default : 0.2 @@ -3701,7 +3701,7 @@ def __init__(self, widthB=1., lengthB=0.2, angleB=None): """ Parameters ---------- - widthB : float, optional, default : 1. + widthB : float, optional, default : 1.0 Width of the bracket lengthB : float, optional, default : 0.2 @@ -3729,7 +3729,7 @@ def __init__(self, """ Parameters ---------- - widthA : float, optional, default : 1. + widthA : float, optional, default : 1.0 Width of the bracket lengthA : int @@ -3738,7 +3738,7 @@ def __init__(self, angleA : float, optional, default : None Angle between the bracket and the line - widthB : float, optional, default : 1. + widthB : float, optional, default : 1.0 Width of the bracket lengthB : int @@ -3763,13 +3763,13 @@ def __init__(self, head_length=.5, head_width=.5, tail_width=.2): """ Parameters ---------- - head_length : float, optional, default : .5 + head_length : float, optional, default : 0.5 Length of the arrow head - head_width : float, optional, default : .5 + head_width : float, optional, default : 0.5 Width of the arrow head - tail_width : float, optional, default : .2 + tail_width : float, optional, default : 0.2 Width of the arrow tail """ @@ -3850,13 +3850,13 @@ def __init__(self, head_length=.4, head_width=.4, tail_width=.4): """ Parameters ---------- - head_length : float, optional, default : .4 + head_length : float, optional, default : 0.4 Length of the arrow head - head_width : float, optional, default : .4 + head_width : float, optional, default : 0.4 Width of the arrow head - tail_width : float, optional, default : .4 + tail_width : float, optional, default : 0.4 Width of the arrow tail """ @@ -3955,7 +3955,7 @@ def __init__(self, tail_width=.3, shrink_factor=0.5): """ Parameters ---------- - tail_width : float, optional, default : .3 + tail_width : float, optional, default : 0.3 Width of the tail shrink_factor : float, optional, default : 0.5 From 2a31ccac7473676ba791674b72baf1060c236ff7 Mon Sep 17 00:00:00 2001 From: patniharshit Date: Tue, 21 Mar 2017 22:26:53 +0530 Subject: [PATCH 4/5] change indentation of parameter description --- lib/matplotlib/patches.py | 76 +++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/lib/matplotlib/patches.py b/lib/matplotlib/patches.py index da9f6d86795d..b8bde01f7d31 100644 --- a/lib/matplotlib/patches.py +++ b/lib/matplotlib/patches.py @@ -3427,10 +3427,10 @@ def __init__(self, head_length=.4, head_width=.2): Parameters ---------- head_length : float, optional, default : 0.4 - Length of the arrow head + Length of the arrow head head_width : float, optional, default : 0.2 - Width of the arrow head + Width of the arrow head """ super(ArrowStyle.CurveA, self).__init__( @@ -3449,10 +3449,10 @@ def __init__(self, head_length=.4, head_width=.2): Parameters ---------- head_length : float, optional, default : 0.4 - Length of the arrow head + Length of the arrow head head_width : float, optional, default : 0.2 - Width of the arrow head + Width of the arrow head """ super(ArrowStyle.CurveB, self).__init__( @@ -3471,10 +3471,10 @@ def __init__(self, head_length=.4, head_width=.2): Parameters ---------- head_length : float, optional, default : 0.4 - Length of the arrow head + Length of the arrow head head_width : float, optional, default : 0.2 - Width of the arrow head + Width of the arrow head """ super(ArrowStyle.CurveAB, self).__init__( @@ -3493,10 +3493,10 @@ def __init__(self, head_length=.4, head_width=.2): Parameters ---------- head_length : float, optional, default : 0.4 - Length of the arrow head + Length of the arrow head head_width : float, optional, default : 0.2 - Width of the arrow head + Width of the arrow head """ super(ArrowStyle.CurveFilledA, self).__init__( @@ -3516,10 +3516,10 @@ def __init__(self, head_length=.4, head_width=.2): Parameters ---------- head_length : float, optional, default : 0.4 - Length of the arrow head + Length of the arrow head head_width : float, optional, default : 0.2 - Width of the arrow head + Width of the arrow head """ super(ArrowStyle.CurveFilledB, self).__init__( @@ -3539,10 +3539,10 @@ def __init__(self, head_length=.4, head_width=.2): Parameters ---------- head_length : float, optional, default : 0.4 - Length of the arrow head + Length of the arrow head head_width : float, optional, default : 0.2 - Width of the arrow head + Width of the arrow head """ super(ArrowStyle.CurveFilledAB, self).__init__( @@ -3641,22 +3641,22 @@ def __init__(self, Parameters ---------- widthA : float, optional, default : 1.0 - Width of the bracket + Width of the bracket lengthA : float, optional, default : 0.2 - Length of the bracket + Length of the bracket angleA : float, optional, default : None - Angle between the bracket and the line + Angle between the bracket and the line widthB : float, optional, default : 1.0 - Width of the bracket + Width of the bracket lengthB : float, optional, default : 0.2 - Length of the bracket + Length of the bracket angleB : float, optional, default : None - Angle between the bracket and the line + Angle between the bracket and the line """ super(ArrowStyle.BracketAB, self).__init__( @@ -3676,13 +3676,13 @@ def __init__(self, widthA=1., lengthA=0.2, angleA=None): Parameters ---------- widthA : float, optional, default : 1.0 - Width of the bracket + Width of the bracket lengthA : float, optional, default : 0.2 - Length of the bracket + Length of the bracket angleA : float, optional, default : None - Angle between the bracket and the line + Angle between the bracket and the line """ super(ArrowStyle.BracketA, self).__init__(True, None, @@ -3702,13 +3702,13 @@ def __init__(self, widthB=1., lengthB=0.2, angleB=None): Parameters ---------- widthB : float, optional, default : 1.0 - Width of the bracket + Width of the bracket lengthB : float, optional, default : 0.2 - Length of the bracket + Length of the bracket angleB : float, optional, default : None - Angle between the bracket and the line + Angle between the bracket and the line """ super(ArrowStyle.BracketB, self).__init__(None, True, @@ -3730,22 +3730,22 @@ def __init__(self, Parameters ---------- widthA : float, optional, default : 1.0 - Width of the bracket + Width of the bracket lengthA : int - Length of the bracket + Length of the bracket angleA : float, optional, default : None - Angle between the bracket and the line + Angle between the bracket and the line widthB : float, optional, default : 1.0 - Width of the bracket + Width of the bracket lengthB : int - Length of the bracket + Length of the bracket angleB : float, optional, default : None - Angle between the bracket and the line + Angle between the bracket and the line """ super(ArrowStyle.BarAB, self).__init__( @@ -3764,13 +3764,13 @@ def __init__(self, head_length=.5, head_width=.5, tail_width=.2): Parameters ---------- head_length : float, optional, default : 0.5 - Length of the arrow head + Length of the arrow head head_width : float, optional, default : 0.5 - Width of the arrow head + Width of the arrow head tail_width : float, optional, default : 0.2 - Width of the arrow tail + Width of the arrow tail """ self.head_length, self.head_width, self.tail_width = \ @@ -3851,13 +3851,13 @@ def __init__(self, head_length=.4, head_width=.4, tail_width=.4): Parameters ---------- head_length : float, optional, default : 0.4 - Length of the arrow head + Length of the arrow head head_width : float, optional, default : 0.4 - Width of the arrow head + Width of the arrow head tail_width : float, optional, default : 0.4 - Width of the arrow tail + Width of the arrow tail """ self.head_length, self.head_width, self.tail_width = \ @@ -3956,10 +3956,10 @@ def __init__(self, tail_width=.3, shrink_factor=0.5): Parameters ---------- tail_width : float, optional, default : 0.3 - Width of the tail + Width of the tail shrink_factor : float, optional, default : 0.5 - Fraction of the arrow width at the middle point + Fraction of the arrow width at the middle point """ self.tail_width = tail_width From 389d85ba979867e7045343b496bc8967d96961e8 Mon Sep 17 00:00:00 2001 From: patniharshit Date: Thu, 23 Mar 2017 18:23:31 +0530 Subject: [PATCH 5/5] update docstring to reflect the call signature --- lib/matplotlib/patches.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/matplotlib/patches.py b/lib/matplotlib/patches.py index b8bde01f7d31..f93643a56b37 100644 --- a/lib/matplotlib/patches.py +++ b/lib/matplotlib/patches.py @@ -3732,18 +3732,12 @@ def __init__(self, widthA : float, optional, default : 1.0 Width of the bracket - lengthA : int - Length of the bracket - angleA : float, optional, default : None Angle between the bracket and the line widthB : float, optional, default : 1.0 Width of the bracket - lengthB : int - Length of the bracket - angleB : float, optional, default : None Angle between the bracket and the line """