@@ -705,8 +705,22 @@ def draw(self, renderer):
705
705
706
706
class Rectangle (Patch ):
707
707
"""
708
- A rectangle with lower left at *xy* = (*x*, *y*) with
709
- specified *width*, *height* and rotation *angle*.
708
+ A rectangle defined via an anchor point *xy* = (*x*, *y*) and it's *width*
709
+ and *height*.
710
+
711
+ The rectangle extends from ``xy[0]`` to ``xy[0] + width`` in x-direction
712
+ and from ``xy[1]`` to ``xy[1] + height`` in y-direction. ::
713
+
714
+ : +------------------+
715
+ : | |
716
+ : height |
717
+ : | |
718
+ : (xy)---- width -----+
719
+
720
+ One may picture *xy* as the bottom left corner, but which corner *xy* is
721
+ actually depends on the the direction of the axis and the sign of *width*
722
+ and *height*; e.g. *xy* would be the bottom right corner if the x-axis
723
+ was inverted or if *width* was negative.
710
724
"""
711
725
712
726
def __str__ (self ):
@@ -720,22 +734,18 @@ def __init__(self, xy, width, height, angle=0.0, **kwargs):
720
734
Parameters
721
735
----------
722
736
xy : (float, float)
723
- The rectangle extends from xy[0] to xy[0] + width in
724
- x-direction and from xy[1] to xy[1] + height in y-direction.
737
+ The anchor point.
725
738
width : float
726
- Rectangle width
739
+ Rectangle width.
727
740
height : float
728
- Rectangle height
741
+ Rectangle height.
729
742
angle : float, default: 0
730
743
Rotation in degrees anti-clockwise about *xy*.
731
- fill : bool, default: True
732
- Whether to fill the rectangle.
733
744
734
- Notes
735
- -----
736
- Valid keyword arguments are:
737
-
738
- %(Patch)s
745
+ Other Parameters
746
+ ----------------
747
+ **kwargs : `Patch` properties
748
+ %(Patch)s
739
749
"""
740
750
741
751
Patch .__init__ (self , ** kwargs )
0 commit comments