8000 DOC: Fix ordering of Examples in docstrings. · matplotlib/matplotlib@0b18183 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0b18183

Browse files
committed
DOC: Fix ordering of Examples in docstrings.
As noted before, the ordering for numpydoc is required, so Examples should be last.
1 parent 65e767a commit 0b18183

File tree

4 files changed

+46
-46
lines changed

4 files changed

+46
-46
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -863,6 +863,12 @@ def axvline(self, x=0, ymin=0, ymax=1, **kwargs):
863863
864864
%(_Line2D_docstr)s
865865
866+
See Also
867+
--------
868+
vlines : Add vertical lines in data coordinates.
869+
axvspan : Add a vertical span (rectangle) across the axis.
870+
axline : Add a line with an abritrary slope.
871+
866872
Examples
867873
--------
868874
* draw a thick red vline at *x* = 0 that spans the yrange::
@@ -877,12 +883,6 @@ def axvline(self, x=0, ymin=0, ymax=1, **kwargs):
877883
the yrange::
878884
879885
>>> axvline(x=.5, ymin=0.25, ymax=0.75)
880-
881-
See also
882-
--------
883-
vlines : Add vertical lines in data coordinates.
884-
axvspan : Add a vertical span (rectangle) across the axis.
885-
axline : Add a line with an abritrary slope.
886886
"""
887887

888888
if "transform" in kwargs:
@@ -929,16 +929,16 @@ def axline(self, xy1, xy2, **kwargs):
929929
930930
%(_Line2D_docstr)s
931931
932+
See Also
933+
--------
934+
axhline : for horizontal lines
935+
axvline : for vertical lines
936+
932937
Examples
933938
--------
934939
Draw a thick red line passing through (0, 0) and (1, 1)::
935940
936941
>>> axline((0, 0), (1, 1), linewidth=4, color='r')
937-
938-
See Also
939-
--------
940-
axhline : for horizontal lines
941-
axvline : for vertical lines
942942
"""
943943

944944
if "transform" in kwargs:

lib/matplotlib/axes/_base.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,6 +1175,13 @@ def set_prop_cycle(self, *args, **kwargs):
11751175
Finite-length iterable of the property values. These values
11761176
are validated and will raise a ValueError if invalid.
11771177
1178+
See Also
1179+
--------
1180+
matplotlib.rcsetup.cycler
1181+
Convenience function for creating validated cyclers for properties.
1182+
cycler.cycler
1183+
The original function for creating unvalidated cyclers.
1184+
11781185
Examples
11791186
--------
11801187
Setting the property cycle for a single property:
@@ -1187,13 +1194,6 @@ def set_prop_cycle(self, *args, **kwargs):
11871194
>>> ax.set_prop_cycle(color=['red', 'green', 'blue'],
11881195
... marker=['o', '+', 'x'])
11891196
1190-
See Also
1191-
--------
1192-
matplotlib.rcsetup.cycler
1193-
Convenience function for creating validated cyclers for properties.
1194-
cycler.cycler
1195-
The original function for creating unvalidated cyclers.
1196-
11971197
"""
11981198
if args and kwargs:
11991199
raise TypeError("Cannot supply both positional and keyword "

lib/matplotlib/figure.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1479,6 +1479,12 @@ def subplots(self, nrows=1, ncols=1, sharex=False, sharey=False,
14791479
dimensions of the resulting array can be controlled with the
14801480
squeeze keyword, see above.
14811481
1482+
See Also
1483+
--------
1484+
.pyplot.subplots
1485+
.Figure.add_subplot
1486+
.pyplot.subplot
1487+
14821488
Examples
14831489
--------
14841490
::
@@ -1517,12 +1523,6 @@ def subplots(self, nrows=1, ncols=1, sharex=False, sharey=False,
15171523
15181524
# Note that this is the same as
15191525
fig.subplots(2, 2, sharex=True, sharey=True)
1520-
1521-
See Also
1522-
--------
1523-
.pyplot.subplots
1524-
.Figure.add_subplot
1525-
.pyplot.subplot
15261526
"""
15271527

15281528
if isinstance(sharex, bool):

lib/matplotlib/pyplot.py

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,6 +1112,14 @@ def subplots(nrows=1, ncols=1, sharex=False, sharey=False, squeeze=True,
11121112
because for the latter it's not clear if it refers to a single
11131113
`~.axes.Axes` instance or a collection of these.
11141114
1115+
See Also
1116+
--------
1117+
.pyplot.figure
1118+
.pyplot.subplot
1119+
.pyplot.axes
1120+
.Figure.subplots
1121+
.Figure.add_subplot
1122+
11151123
Examples
11161124
--------
11171125
::
@@ -1152,14 +1160,6 @@ def subplots(nrows=1, ncols=1, sharex=False, sharey=False, squeeze=True,
11521160
# and clears it if it already exists.
11531161
fig, ax = plt.subplots(num=10, clear=True)
11541162
1155-
See Also
1156-
--------
1157-
.pyplot.figure
1158-
.pyplot.subplot
1159-
.pyplot.axes
1160-
.Figure.subplots
1161-
.Figure.add_subplot
1162-
11631163
"""
11641164
fig = figure(**fig_kw)
11651165
axs = fig.subplots(nrows=nrows, ncols=ncols, sharex=sharex, sharey=sharey,
@@ -1570,6 +1570,13 @@ def rgrids(*args, **kwargs):
15701570
**kwargs
15711571
*kwargs* are optional `~.Text` properties for the labels.
15721572
1573+
See Also
1574+
--------
1575+
.pyplot.thetagrids
1576+
.projections.polar.PolarAxes.set_rgrids
1577+
.Axis.get_gridlines
1578+
.Axis.get_ticklabels
1579+
15731580
Examples
15741581
--------
15751582
::
@@ -1579,13 +1586,6 @@ def rgrids(*args, **kwargs):
15791586
15801587
# set the locations and labels of the radial gridlines
15811588
lines, labels = rgrids( (0.25, 0.5, 1.0), ('Tom', 'Dick', 'Harry' ))
1582-
1583-
See Also
1584-
--------
1585-
.pyplot.thetagrids
1586-
.projections.polar.PolarAxes.set_rgrids
1587-
.Axis.get_gridlines
1588-
.Axis.get_ticklabels
15891589
"""
15901590
ax = gca()
15911591
if not isinstance(ax, PolarAxes):
@@ -1634,6 +1634,13 @@ def thetagrids(*args, **kwargs):
16341634
**kwargs
16351635
*kwargs* are optional `~.Text` properties for the labels.
16361636
1637+
See Also
1638+
--------
1639+
.pyplot.rgrids
1640+
.projections.polar.PolarAxes.set_thetagrids
1641+
.Axis.get_gridlines
1642+
.Axis.get_ticklabels
1643+
16371644
Examples
16381645
--------
16391646
::
@@ -1643,13 +1650,6 @@ def thetagrids(*args, **kwargs):
16431650
16441651
# set the locations and labels of the angular gridlines
16451652
lines, labels = thetagrids(range(45, 360, 90), ('NE', 'NW', 'SW', 'SE'))
1646-
1647-
See Also
1648-
--------
1649-
.pyplot.rgrids
1650-
.projections.polar.PolarAxes.set_thetagrids
1651-
.Axis.get_gridlines
1652-
.Axis.get_ticklabels
16531653
"""
16541654
ax = gca()
16551655
if not isinstance(ax, PolarAxes):

0 commit comments

Comments
 (0)
0