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

Skip to content

Commit 00cea3e

Browse files
committed
Reword add_subplot docstring.
- Move description of the "rare" case to where that parameter is described. - Make return type fit in one line, avoiding an awkward line continuation or bunch of spaces in the unrendered docs.
1 parent cc7c347 commit 00cea3e

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

lib/matplotlib/figure.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1281,6 +1281,10 @@ def add_subplot(self, *args, **kwargs):
12811281
12821282
If no positional arguments are passed, defaults to (1, 1, 1).
12831283
1284+
In rare circumstances, `.add_subplot` may be called with a single
1285+
argument, a subplot axes instance already created in the
1286+
present figure but not in the figure's list of axes.
1287+
12841288
projection : {None, 'aitoff', 'hammer', 'lambert', 'mollweide', \
12851289
'polar', 'rectilinear', str}, optional
12861290
The projection type of the subplot (`~.axes.Axes`). *str* is the
@@ -1310,8 +1314,7 @@ def add_subplot(self, *args, **kwargs):
13101314
13111315
Returns
13121316
-------
1313-
axes : an `.axes.SubplotBase` subclass of `~.axes.Axes` (or a \
1314-
subclass of `~.axes.Axes`)
1317+
axes : `.axes.SubplotBase`, or another subclass of `~.axes.Axes`
13151318
13161319
The axes of the subplot. The returned axes base class depends on
13171320
the projection used. It is `~.axes.Axes` if rectilinear projection
@@ -1330,10 +1333,6 @@ def add_subplot(self, *args, **kwargs):
13301333
two subplots that are otherwise identical to be added to the figure,
13311334
make sure you give them unique labels.
13321335
1333-
In rare circumstances, `.add_subplot` may be called with a single
1334-
argument, a subplot axes instance already created in the
1335-
present figure but not in the figure's list of axes.
1336-
13371336
See Also
13381337
--------
13391338
.Figure.add_axes

0 commit comments

Comments
 (0)