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

Skip to content

Commit 642c6d0

Browse files
authored
Merge pull request #19977 from QuLogic/fix-doc-build
Fix doc build
2 parents f7068ab + 46dbc87 commit 642c6d0

File tree

4 files changed

+29
-21
lines changed

4 files changed

+29
-21
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,10 @@ doc/api/_as_gen
6767
# autogenerated by sphinx-gallery
6868
doc/examples
6969
doc/gallery
70-
doc/tutorials
7170
doc/modules
71+
doc/plot_types
7272
doc/pyplots/tex_demo.png
73+
doc/tutorials
7374
lib/dateutil
7475
examples/*/*.eps
7576
examples/*/*.pdf

doc/api/patches_api.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Classes
1717
:toctree: _as_gen/
1818
:template: autosummary.rst
1919

20+
Annulus
2021
Arc
2122
Arrow
2223
ArrowStyle

doc/users/next_whats_new/annulus.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Add ``Annulus`` patch
22
---------------------
33

4-
A new class for drawing elliptical annuli.
4+
`.Annulus` is a new class for drawing elliptical annuli.
55

66
.. plot::
77

@@ -14,4 +14,4 @@ A new class for drawing elliptical annuli.
1414
fc='m', ec='b', alpha=0.5, hatch='xxx')
1515
ax.add_patch(cir)
1616
ax.add_patch(ell)
17-
ax.set_aspect('equal')
17+
ax.set_aspect('equal')

lib/matplotlib/patches.py

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1577,24 +1577,27 @@ class Annulus(Patch):
15771577
@docstring.dedent_interpd
15781578
def __init__(self, xy, r, width, angle=0.0, **kwargs):
15791579
"""
1580+
Parameters
1581+
----------
15801582
xy : (float, float)
15811583
xy coordinates of annulus centre.
15821584
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.
15861589
width : float
15871590
Width (thickness) of the annular ring. The width is measured inward
15881591
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
15921595
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:
15961599
1597-
%(Patch_kwdoc)s
1600+
%(Patch_kwdoc)s
15981601
"""
15991602
super().__init__(**kwargs)
16001603

@@ -1633,8 +1636,9 @@ def get_center(self):
16331636

16341637
def set_width(self, width):
16351638
"""
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.
16381642
16391643
Parameters
16401644
----------
@@ -1649,9 +1653,7 @@ def set_width(self, width):
16491653
self.stale = True
16501654

16511655
def get_width(self):
1652-
"""
1653-
Return the width (thickness) of the annulus ring.
1654-
"""
1656+
"""Return the width (thickness) of the annulus ring."""
16551657
return self._width
16561658

16571659
width = property(get_width, set_width)
@@ -1700,12 +1702,15 @@ def set_semiminor(self, b):
17001702

17011703
def set_radii(self, r):
17021704
"""
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.
17051706
17061707
Parameters
17071708
----------
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.
17091714
"""
17101715
if np.shape(r) == (2,):
17111716
self.a, self.b = r
@@ -1718,6 +1723,7 @@ def set_radii(self, r):
17181723
self.stale = True
17191724

17201725
def get_radii(self):
1726+
"""Return the semi-major and semi-minor radii of the annulus."""
17211727
return self.a, self.b
17221728

17231729
radii = property(get_radii, set_radii)

0 commit comments

Comments
 (0)