Skip to content

Commit c38ca84

Browse files
committed
Cleanup docstrings
1 parent 8946d4d commit c38ca84

2 files changed

Lines changed: 27 additions & 26 deletions

File tree

proplot/axes/plot.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@
111111
_args_1d_shared_docstring = """
112112
data : dict-like, optional
113113
A dict-like dataset container (e.g., `~pandas.DataFrame` or
114-
`~xarray.DataArray`). If passed, positional arguments can optionally
115-
be string `data` keys and the arrays used for plotting are retrieved
114+
`~xarray.Dataset`). If passed, each data argument can optionally
115+
be a string `key` and the arrays used for plotting are retrieved
116116
with ``data[key]``. This is a `native matplotlib feature
117117
<https://matplotlib.org/stable/gallery/misc/keyword_plotting.html>`__.
118118
autoformat : bool, optional
@@ -152,15 +152,15 @@
152152
_guide_docstring = """
153153
colorbar : bool, int, or str, optional
154154
If not ``None``, this is a location specifying where to draw an
155-
*inner* or *outer* colorbar from the resulting object(s). If ``True``,
155+
*inset* or *outer* colorbar from the resulting object(s). If ``True``,
156156
the default :rc:`colorbar.loc` is used. If the same location is
157157
used in successive plotting calls, object(s) will be added to the
158158
existing colorbar in that location (valid for colorbars built from lists
159159
of artists). Valid locations are shown in in `~proplot.axes.Axes.colorbar`.
160160
colorbar_kw : dict-like, optional
161161
Extra keyword args for the call to `~proplot.axes.Axes.colorbar`.
162162
legend : bool, int, or str, optional
163-
Location specifying where to draw an *inner* or *outer* legend from the
163+
Location specifying where to draw an *inset* or *outer* legend from the
164164
resulting object(s). If ``True``, the default :rc:`legend.loc` is used.
165165
If the same location is used in successive plotting calls, object(s)
166166
will be added to existing legend in that location. Valid locations
@@ -846,8 +846,8 @@
846846
847847
See also
848848
--------
849-
PlotAxes.violins
850-
PlotAxes.violinsh
849+
PlotAxes.violin
850+
PlotAxes.violinh
851851
PlotAxes.violinplot
852852
PlotAxes.violinploth
853853
matplotlib.axes.Axes.violinplot

proplot/gridspec.py

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,17 @@
3333
left, right, top, bottom : unit-spec, optional
3434
The fixed space between the subplots and the figure edge. Default is ``None``.
3535
%(units.em)s
36-
If ``None``, the space is determined automatically based on the font size and
37-
axis sharing settings. If :rcraw:`subplots.tight` is ``True``, the space is
38-
determined by the tight layout algorithm.
36+
If ``None``, the space is determined automatically based on the tick and
37+
label settings. If :rcraw:`subplots.tight` is ``True`` or ``tight=True`` was
38+
passed to the figure, the space is determined by the tight layout algorithm.
3939
"""
4040
_scalar_docstring = """
4141
wspace, hspace, space : unit-spec, optional
4242
The fixed space between grid columns, rows, or both. Default is ``None``.
4343
%(units.em)s
44-
If ``None``, the space is determined automatically based on the font size and
45-
axis sharing settings. If :rcraw:`subplots.tight` is ``True``, the space is
46-
determined by the tight layout algorithm.
44+
If ``None``, the space is determined automatically based on the font size and axis
45+
sharing settings. If :rcraw:`subplots.tight` is ``True`` or ``tight=True`` was
46+
passed to the figure, the space is determined by the tight layout algorithm.
4747
"""
4848
_vector_docstring = """
4949
wspace, hspace, space : unit-spec or sequence, optional
@@ -54,40 +54,41 @@
5454
%(units.em)s
5555
5656
For elements equal to ``None``, the space is determined automatically based
57-
on the font and tick settings. If :rcraw:`subplots.tight` is ``True``, the
58-
space is determined by the tight layout algorithm. Otherwise, a sensible default
59-
value is chosen. For example, ``subplots(ncols=3, tight=True, wspace=(2, None))``
57+
on the tick and label settings. If :rcraw:`subplots.tight` is ``True`` or
58+
``tight=True`` was passed to the figure, the space is determined by the tight
59+
layout algorithm. For example, ``subplots(ncols=3, tight=True, wspace=(2, None))``
6060
fixes the space between columns 1 and 2 but lets the tight layout algorithm
6161
determine the space between columns 2 and 3.
6262
wratios, hratios : float or sequence, optional
6363
Passed to `~proplot.gridspec.GridSpec`, denotes the width and height
6464
ratios for the subplot grid. Length of `wratios` must match the number
6565
of rows, and length of `hratios` must match the number of columns.
6666
width_ratios, height_ratios
67-
Aliases for `wratios`, `hratios`. Included for consistency with
68-
the `matplotlib.pyplot.subplots` command.
67+
Aliases for `wratios`, `hratios`. Included for
68+
consistency with `matplotlib.gridspec.GridSpec`.
6969
wpad, hpad, pad : unit-spec or sequence, optional
70-
The tight layout padding between columns, rows, and both, respectively. Unlike
71-
``space``, these control the padding between subplot content (including text,
72-
ticks, etc.) rather than subplot edges. As with ``space``, these can be scalars
73-
or arrays optionally containing ``None``. Default is `innerpad`.
70+
The tight layout padding between columns, rows, and both, respectively.
71+
Unlike ``space``, these control the padding between subplot content
72+
(including text, ticks, etc.) rather than subplot edges. As with
73+
``space``, these can be scalars or arrays optionally containing ``None``.
74+
For elements equal to ``None``, the default is `innerpad`.
7475
%(units.em)s
7576
"""
7677
_tight_docstring = """
7778
wequal, hequal, equal : bool, optional
78-
Whether to make the tight layout algorithm apply equal spacing between columns,
79-
rows, or both. Default is ``False``. Ignored if :rcraw:`tight` is ``False``.
79+
Whether to make the tight layout algorithm apply equal spacing
80+
between columns, rows, or both. Default is ``False``.
8081
outerpad : unit-spec, optional
81-
The tight layout padding around the left, right, top, and bottom edges
82+
The scalar tight layout padding around the left, right, top, and bottom edges
8283
of the figure. Default is :rc:`subplots.outerpad`.
8384
%(units.em)s
8485
innerpad : unit-spec, optional
8586
The scalar tight layout padding between columns and rows. Synonymous with
8687
`pad`. Default is :rc:`subplots.innerpad`.
8788
%(units.em)s
8889
panelpad : unit-spec, optional
89-
The tight layout padding between subplots and axes panels and between "stacked"
90-
panels. Default is :rc:`subplots.panelpad`.
90+
The scalar tight layout padding between subplots and their panels, colorbars, and
91+
legends and between "stacks" of these objects. Default is :rc:`subplots.panelpad`.
9192
%(units.em)s
9293
"""
9394
docstring._snippet_manager['gridspec.shared'] = _shared_docstring

0 commit comments

Comments
 (0)