@@ -1577,24 +1577,27 @@ class Annulus(Patch):
1577
1577
@docstring .dedent_interpd
1578
1578
def __init__ (self , xy , r , width , angle = 0.0 , ** kwargs ):
1579
1579
"""
1580
+ Parameters
1581
+ ----------
1580
1582
xy : (float, float)
1581
1583
xy coordinates of annulus centre.
1582
1584
r : float or (float, float)
1583
- The radius, or semi-axes.
1584
- - If float: radius of the outer circle.
1585
- - If two floats: semi-major and -minor axes of outer ellipse.
1585
+ The radius, or semi-axes:
1586
+
1587
+ - If float: radius of the outer circle.
1588
+ - If two floats: semi-major and -minor axes of outer ellipse.
1586
1589
width : float
1587
1590
Width (thickness) of the annular ring. The width is measured inward
1588
1591
from the outer ellipse so that for the inner ellipse the semi-axes
1589
- are given by `r - width`. ` width` must be less than or equal to the
1590
- semi-minor axis.
1591
- angle : float, default= 0
1592
+ are given by `` r - width``. * width* must be less than or equal to
1593
+ the semi-minor axis.
1594
+ angle : float, default: 0
1592
1595
Rotation angle in degrees (anti-clockwise from the positive
1593
- x-axis). Ignored for circular annuli (ie. if *r* is a scalar).
1594
-
1595
- Valid kwargs are :
1596
+ x-axis). Ignored for circular annuli (i.e., if *r* is a scalar).
1597
+ **kwargs
1598
+ Keyword arguments control the `Patch` properties :
1596
1599
1597
- %(Patch_kwdoc)s
1600
+ %(Patch_kwdoc)s
1598
1601
"""
1599
1602
super ().__init__ (** kwargs )
1600
1603
@@ -1633,8 +1636,9 @@ def get_center(self):
1633
1636
1634
1637
def set_width (self , width ):
1635
1638
"""
1636
- Set the width (thickness) of the annulus ring. The width is measured
1637
- inwards from the outer ellipse.
1639
+ Set the width (thickness) of the annulus ring.
1640
+
1641
+ The width is measured inwards from the outer ellipse.
1638
1642
1639
1643
Parameters
1640
1644
----------
@@ -1649,9 +1653,7 @@ def set_width(self, width):
1649
1653
self .stale = True
1650
1654
1651
1655
def get_width (self ):
1652
- """
1653
- Return the width (thickness) of the annulus ring.
1654
- """
1656
+ """Return the width (thickness) of the annulus ring."""
1655
1657
return self ._width
1656
1658
1657
1659
width = property (get_width , set_width )
@@ -1700,12 +1702,15 @@ def set_semiminor(self, b):
1700
1702
1701
1703
def set_radii (self , r ):
1702
1704
"""
1703
- Set the both the semi-major (*a*) and -minor radii (*b*) of the
1704
- annulus.
1705
+ Set the semi-major (*a*) and semi-minor radii (*b*) of the annulus.
1705
1706
1706
1707
Parameters
1707
1708
----------
1708
- r : (float, float)
1709
+ r : float or (float, float)
1710
+ The radius, or semi-axes:
1711
+
1712
+ - If float: radius of the outer circle.
1713
+ - If two floats: semi-major and -minor axes of outer ellipse.
1709
1714
"""
1710
1715
if np .shape (r ) == (2 ,):
1711
1716
self .a , self .b = r
@@ -1718,6 +1723,7 @@ def set_radii(self, r):
1718
1723
self .stale = True
1719
1724
1720
1725
def get_radii (self ):
1726
+ """Return the semi-major and semi-minor radii of the annulus."""
1721
1727
return self .a , self .b
1722
1728
1723
1729
radii = property (get_radii , set_radii )
0 commit comments