Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8ee4da2

Browse files
committed
Clean docstring of Rectangle methods
1 parent f40607e commit 8ee4da2

File tree

1 file changed

+18
-25
lines changed

1 file changed

+18
-25
lines changed

lib/matplotlib/patches.py

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -650,12 +650,21 @@ def __str__(self):
650650
@docstring.dedent_interpd
651651
def __init__(self, xy, width, height, angle=0.0, **kwargs):
652652
"""
653+
Parameters
654+
----------
655+
xy: length-2 tuple
656+
The bottom and left rectangle coordinates
657+
width:
658+
Rectangle width
659+
height:
660+
Rectangle height
661+
angle: float, optional
662+
rotation in degrees anti-clockwise about *xy* (default is 0.0)
663+
fill: bool, optional
664+
Whether to fill the rectangle (default is ``True``)
653665
654-
*angle*
655-
rotation in degrees (anti-clockwise)
656-
657-
*fill* is a boolean indicating whether to fill the rectangle
658-
666+
Notes
667+
-----
659668
Valid kwargs are:
660669
%(Patch)s
661670
"""
@@ -735,21 +744,13 @@ def get_height(self):
735744
return self._height
736745

737746
def set_x(self, x):
738-
"""
739-
Set the left coord of the rectangle
740-
741-
ACCEPTS: float
742-
"""
747+
"Set the left coord of the rectangle"
743748
self._x0 = x
744749
self._update_x1()
745750
self.stale = True
746751

747752
def set_y(self, y):
748-
"""
749-
Set the bottom coord of the rectangle
750-
751-
ACCEPTS: float
752-
"""
753+
"Set the bottom coord of the rectangle"
753754
self._y0 = y
754755
self._update_y1()
755756
self.stale = True
@@ -766,21 +767,13 @@ def set_xy(self, xy):
766767
self.stale = True
767768

768769
def set_width(self, w):
769-
"""
770-
Set the width rectangle
771-
772-
ACCEPTS: float
773-
"""
770+
"Set the width of the rectangle"
774771
self._width = w
775772
self._update_x1()
776773
self.stale = True
777774

778775
def set_height(self, h):
779-
"""
780-
Set the width rectangle
781-
782-
ACCEPTS: float
783-
"""
776+
"Set the height of the rectangle"
784777
self._height = h
785778
self._update_y1()
786779
self.stale = True

0 commit comments

Comments
 (0)