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

Skip to content

Commit 229837e

Browse files
committed
Clean docstring of Rectangle methods
1 parent 9c13491 commit 229837e

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
@@ -676,12 +676,21 @@ def __str__(self):
676676
@docstring.dedent_interpd
677677
def __init__(self, xy, width, height, angle=0.0, **kwargs):
678678
"""
679+
Parameters
680+
----------
681+
xy: length-2 tuple
682+
The bottom and left rectangle coordinates
683+
width:
684+
Rectangle width
685+
height:
686+
Rectangle height
687+
angle: float, optional
688+
rotation in degrees anti-clockwise about *xy* (default is 0.0)
689+
fill: bool, optional
690+
Whether to fill the rectangle (default is ``True``)
679691
680-
*angle*
681-
rotation in degrees (anti-clockwise)
682-
683-
*fill* is a boolean indicating whether to fill the rectangle
684-
692+
Notes
693+
-----
685694
Valid kwargs are:
686695
%(Patch)s
687696
"""
@@ -761,21 +770,13 @@ def get_height(self):
761770
return self._height
762771

763772
def set_x(self, x):
764-
"""
765-
Set the left coord of the rectangle
766-
767-
ACCEPTS: float
768-
"""
773+
"Set the left coord of the rectangle"
769774
self._x0 = x
770775
self._update_x1()
771776
self.stale = True
772777

773778
def set_y(self, y):
774-
"""
775-
Set the bottom coord of the rectangle
776-
777-
ACCEPTS: float
778-
"""
779+
"Set the bottom coord of the rectangle"
779780
self._y0 = y
780781
self._update_y1()
781782
self.stale = True
@@ -792,21 +793,13 @@ def set_xy(self, xy):
792793
self.stale = True
793794

794795
def set_width(self, w):
795-
"""
796-
Set the width rectangle
797-
798-
ACCEPTS: float
799-
"""
796+
"Set the width of the rectangle"
800797
self._width = w
801798
self._update_x1()
802799
self.stale = True
803800

804801
def set_height(self, h):
805-
"""
806-
Set the width rectangle
807-
808-
ACCEPTS: float
809-
"""
802+
"Set the height of the rectangle"
810803
self._height = h
811804
self._update_y1()
812805
self.stale = True

0 commit comments

Comments
 (0)