From f20ad220456e7b9c5945b8e86f02894387032483 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Thu, 25 Apr 2019 12:00:58 +0100 Subject: [PATCH] Backport PR #14033: Reword add_subplot docstring. --- lib/matplotlib/figure.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/matplotlib/figure.py b/lib/matplotlib/figure.py index b1d781a3ad19..2866c1a6b362 100644 --- a/lib/matplotlib/figure.py +++ b/lib/matplotlib/figure.py @@ -1288,6 +1288,10 @@ def add_subplot(self, *args, **kwargs): If no positional arguments are passed, defaults to (1, 1, 1). + In rare circumstances, `.add_subplot` may be called with a single + argument, a subplot axes instance already created in the + present figure but not in the figure's list of axes. + projection : {None, 'aitoff', 'hammer', 'lambert', 'mollweide', \ 'polar', 'rectilinear', str}, optional The projection type of the subplot (`~.axes.Axes`). *str* is the @@ -1317,8 +1321,7 @@ def add_subplot(self, *args, **kwargs): Returns ------- - axes : an `.axes.SubplotBase` subclass of `~.axes.Axes` (or a \ - subclass of `~.axes.Axes`) + axes : `.axes.SubplotBase`, or another subclass of `~.axes.Axes` The axes of the subplot. The returned axes base class depends on the projection used. It is `~.axes.Axes` if rectilinear projection @@ -1337,10 +1340,6 @@ def add_subplot(self, *args, **kwargs): two subplots that are otherwise identical to be added to the figure, make sure you give them unique labels. - In rare circumstances, `.add_subplot` may be called with a single - argument, a subplot axes instance already created in the - present figure but not in the figure's list of axes. - See Also -------- .Figure.add_axes