8000 Update docstring. · matplotlib/matplotlib@b6c2148 · GitHub
[go: up one dir, main page]

Skip to content

Commit b6c2148

Browse files
committed
Update docstring.
1 parent f197486 commit b6c2148

File tree

1 file changed

+50
-50
lines changed

1 file changed

+50
-50
lines changed

lib/matplotlib/figure.py

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,71 +1007,71 @@ def add_subplots(self, nrows=1, ncols=1, sharex=False, sharey=False,
10071007
"""
10081008
Add a set of subplots to this figure.
10091009
1010-
Keyword arguments:
1010+
Parameters
1011+
----------
1012+
nrows : int, default: 1
1013+
Number of rows of the subplot grid.
1014+
1015+
ncols : int, default: 1
1016+
Number of columns of the subplot grid.
1017+
1018+
sharex : {"none", "all", "row", "col"} or bool, default: False
1019+
If *False*, or "none", each subplot has its own X axis.
1020+
1021+
If *True*, or "all", all subplots will share an X axis, and the x
1022+
tick labels on all but the last row of plots will be invisible.
1023+
1024+
If "col", each subplot column will share an X axis, and the x
1025+
tick labels on all but the last row of plots will be invisible.
1026+
1027+
If "row", each subplot row will share an X axis.
1028+
1029+
sharey : {"none", "all", "row", "col"} or bool, default: False
1030+
If *False*, or "none", each subplot has its own Y axis.
1031+
1032+
If *True*, or "all", all subplots will share an Y axis, and the x
1033+
tick labels on all but the first column of plots will be invisible.
10111034
1012-
*nrows* : int
1013-
Number of rows of the subplot grid. Defaults to 1.
1014-
1015-
*ncols* : int
1016-
Number of columns of the subplot grid. Defaults to 1.
1017-
1018-
*sharex* : string or bool
1019-
If *True*, the X axis will be shared amongst all subplots. If
1020-
*True* and you have multiple rows, the x tick labels on all but
1021-
the last row of plots will have visible set to *False*
1022-
If a string must be one of "row", "col", "all", or "none".
1023-
"all" has the same effect as *True*, "none" has the same effect
1024-
as *False*.
1025-
If "row", each subplot row will share a X axis.
1026-
If "col", each subplot column will share a X axis and the x tick
1027-
labels on all but the last row will have visible set to *False*.
1028-
1029-
*sharey* : string or bool
1030-
If *True*, the Y axis will be shared amongst all subplots. If
1031-
*True* and you have multiple columns, the y tick labels on all but
1032-
the first column of plots will have visible set to *False*
1033-
If a string must be one of "row", "col", "all", or "none".
1034-
"all" has the same effect as *True*, "none" has the same effect
1035-
as *False*.
1036-
If "row", each subplot row will share a Y axis and the y tick
1037-
labels on all but the first column will have visible set to *False*.
1038-
If "col", each subplot column will share a Y axis.
1039-
1040-
*squeeze* : bool
1041-
If *True*, extra dimensions are squeezed out from the
1042-
returned axis object:
1043-
1044-
- if only one subplot is constructed (nrows=ncols=1), the
1045-
resulting single Axis object is returned as a scalar.
1035+
If "row", each subplot row will share an Y axis, and the x tick
1036+
labels on all but the first column of plots will be invisible.
1037+
1038+
If "col", each subplot column will share an Y axis.
1039+
1040+
squeeze : bool, default: True
1041+
If *True*, extra dimensions are squeezed out from the returned axes
1042+
array:
1043+
1044+
- if only one subplot is constructed (nrows=ncols=1), the resulting
1045+
single Axes object is returned as a scalar.
10461046
10471047
- for Nx1 or 1xN subplots, the returned object is a 1-d numpy
1048-
object array of Axis objects are returned as numpy 1-d
1049-
arrays.
1048+
object array of Axes objects are returned as numpy 1-d arrays.
10501049
1051-
- for NxM subplots with N>1 and M>1 are returned as a 2d
1052-
array.
1050+
- for NxM subplots with N>1 and M>1 are returned as a 2d array.
10531051
1054-
If *False*, no squeezing at all is done: the returned axis
1055-
object is always a 2-d array containing Axis instances, even if it
1056-
ends up being 1x1.
1052+
If *False*, no squeezing at all is done: the returned axes object
1053+
is always a 2-d array of Axes instances, even if it ends up being
1054+
1x1.
10571055
1058-
*subplot_kw* : dict
1056+
subplot_kw : dict, default: {}
10591057
Dict with keywords passed to the
1060-
:meth:`~matplotlib.figure.Figure.add_subplot` call used to
1061-
create each subplots.
1058+
:meth:`~matplotlib.figure.Figure.add_subplot` call used to create
1059+
each subplots.
10621060
1063-
*gridspec_kw* : dict
1061+
gridspec_kw : dict, default: {}
10641062
Dict with keywords passed to the
10651063
:class:`~matplotlib.gridspec.GridSpec` constructor used to create
10661064
the grid the subplots are placed on.
10671065
1068-
Returns:
1069-
1070-
ax : single axes object or array of axes objects
1066+
Returns
1067+
-------
1068+
ax : single Axes object or array of Axes objects
10711069
The addes axes. The dimensions of the resulting array can be
10721070
controlled with the squeeze keyword, see above.
10731071
1074-
See the docstring of :func:`~pyplot.subplots' for examples
1072+
See Also
1073+
--------
1074+
pyplot.subplots : pyplot API; docstring includes examples.
10751075
"""
10761076

10771077
# for backwards compatibility

0 commit comments

Comments
 (0)
0