Skip to content

Commit 9b7976d

Browse files
committed
Fix dead SubplotGrid links
1 parent e627e95 commit 9b7976d

9 files changed

Lines changed: 25 additions & 27 deletions

File tree

docs/basics.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@
298298
# the `~proplot.constructor.Locator`, `~proplot.constructor.Formatter`,
299299
# and `~proplot.constructor.Scale` :ref:`constructor functions <ug_cartesian>`.
300300
# You can also call ``format`` for several subplots at once using
301-
# `proplot.figure.Figure.format` or `proplot.figure.SubplotGrid.format` (see below).
301+
# `proplot.figure.Figure.format` or `proplot.gridspec.SubplotGrid.format` (see below).
302302
#
303303
# The below example shows the many different keyword arguments accepted by
304304
# ``format``, and demonstrates how ``format`` can be used to succinctly and
@@ -338,28 +338,28 @@
338338
# In matplotlib, `~matplotlib.figure.Figure.subplots` returns a 2D `~numpy.ndarray` for
339339
# figures with more than one column and row, a 1D `~numpy.ndarray` for single-column or
340340
# row figures, or an `~matplotlib.axes.Axes` for single-subplot figures. In ProPlot,
341-
# `~proplot.figure.Figure.subplots` returns a `~proplot.figure.SubplotGrid` that
341+
# `~proplot.figure.Figure.subplots` returns a `~proplot.gridspec.SubplotGrid` that
342342
# unifies these three possible return values:
343343
#
344-
# * `~proplot.figure.SubplotGrid` permits array-like 2D indexing, e.g.
345-
# ``axs[1, 0]``. Indexing the `~proplot.figure.SubplotGrid` is similar
344+
# * `~proplot.gridspec.SubplotGrid` permits array-like 2D indexing, e.g.
345+
# ``axs[1, 0]``. Indexing the `~proplot.gridspec.SubplotGrid` is similar
346346
# to indexing a `~proplot.gridspec.GridSpec`. The result is a
347-
# `~proplot.figure.SubplotGrid` of subplots that occupy the indexed
347+
# `~proplot.gridspec.SubplotGrid` of subplots that occupy the indexed
348348
# `~proplot.gridspec.GridSpec` slot(s).
349-
# * `~proplot.figure.SubplotGrid` permits list-like 1D indexing, e.g. ``axs[0]``.
349+
# * `~proplot.gridspec.SubplotGrid` permits list-like 1D indexing, e.g. ``axs[0]``.
350350
# The default order can be switched from row-major to column-major by passing
351351
# ``order='F'`` to `~proplot.ui.subplots`.
352-
# * `~proplot.figure.SubplotGrid` behaves like a scalar when it is singleton.
352+
# * `~proplot.gridspec.SubplotGrid` behaves like a scalar when it is singleton.
353353
# That is, if you make a single subplot with ``fig, ax = pplt.subplots()``,
354354
# ``ax[0].method(...)`` is equivalent to ``ax.method(...)``.
355355
#
356356
# If you added subplots one-by-one with `~proplot.figure.Figure.subplot` or
357-
# `~proplot.figure.Figure.add_subplot`, a `~proplot.figure.SubplotGrid` containing
357+
# `~proplot.figure.Figure.add_subplot`, a `~proplot.gridspec.SubplotGrid` containing
358358
# the numbered subplots is available via the `proplot.figure.Figure.subplotgrid`
359-
# property. `~proplot.figure.SubplotGrid` is especially useful because it lets you
359+
# property. `~proplot.gridspec.SubplotGrid` is especially useful because it lets you
360360
# call ``format``, ``colorbar``, ``legend``, ``panel``, ``inset``, and the various
361361
# twin axis commands simultaneously for all subplots in the grid. In the below
362-
# example, we use `~proplot.figure.SubplotGrid.format` command on the grid
362+
# example, we use `~proplot.gridspec.SubplotGrid.format` command on the grid
363363
# returned by `~proplot.ui.subplots` to format several subplots all at once.
364364

365365
# %%

docs/conf.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,14 +170,12 @@
170170
napoleon_preprocess_types = True
171171
napoleon_type_aliases = {
172172
# Python or inherited terms
173-
'sequence': ':term:`sequence`',
174-
'iterable': ':term:`iterable`',
175173
'mapping': ':term:`mapping`',
176174
'hashable': ':term:`hashable`',
177175
'sequence': ':term:`sequence`',
176+
'iterable': ':term:`iterable`',
178177
'dict-like': ':term:`dict-like <mapping>`',
179178
'path-like': ':term:`path-like <path-like object>`',
180-
'file-like': ':term:`file-like <file-like object>`',
181179
'array-like': ':term:`array-like <array_like>`',
182180
'scalar': ':term:`scalar`',
183181
'bool': ':class:`bool <bool>`',

docs/insets_panels.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
# string, e.g. ``'r'`` or ``'right'`` for a right-hand side panel, and the
3333
# resulting panel axes are instances of `~proplot.axes.CartesianAxes`.
3434
# To generate "stacked" panels, call `~proplot.axes.Axes.panel_axes` more than once.
35-
# To generate several panels at once, call `~proplot.figure.SubplotGrid.panel_axes`
36-
# on the `~proplot.figure.SubplotGrid` returned by `~proplot.figure.subplots`.
35+
# To generate several panels at once, call `~proplot.gridspec.SubplotGrid.panel_axes`
36+
# on the `~proplot.gridspec.SubplotGrid` returned by `~proplot.figure.subplots`.
3737
# Note that panels :ref:`do not interfere with the tight layout algorithm <ug_tight>`
3838
# and :ref:`do not affect the subplot aspect ratios <ug_autosize>`.
3939
#
@@ -126,7 +126,7 @@
126126
# <https://matplotlib.org/stable/gallery/subplots_axes_and_figures/zoom_inset_axes.html>`__
127127
# can be generated with the `~proplot.axes.Axes.inset` or
128128
# `~proplot.axes.Axes.inset_axes` commands. To generate several insets at once,
129-
# call `~proplot.figure.SubplotGrid.inset_axes` on the `~proplot.figure.SubplotGrid`
129+
# call `~proplot.gridspec.SubplotGrid.inset_axes` on the `~proplot.gridspec.SubplotGrid`
130130
# returned by `~proplot.figure.Figure.subplots`. By default, inset axes have the
131131
# same projection as the parent axes, but you can also request a :ref:`different
132132
# projection <ug_proj>` (e.g., ``ax.inset_axes(bounds, proj='polar')``).

docs/layout.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
# in the array. But if you used the `ncols` and `nrows` keyword arguments, the
4242
# number order is row-major by default and can be switched to column-major by
4343
# passing ``order='F'``. The number order also determines the subplot order in
44-
# the `~proplot.figure.SubplotGrid` returned by `~proplot.figure.Figure.add_subplots`.
44+
# the `~proplot.gridspec.SubplotGrid` returned by `~proplot.figure.Figure.add_subplots`.
4545
#
4646
# To turn on "a-b-c" labels, set :rcraw:`abc` to ``True`` or pass ``abc=True``
4747
# to `~proplot.axes.Axes.format` (see :ref:`the format command <ug_format>`

docs/why.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Think of this as an expanded and thoroughly documented version of the
9191
like axis labels and titles and apply new :ref:`"rc" settings <why_rc>` to existing
9292
axes. It also integrates with various :ref:`constructor functions <why_constructor>`
9393
to help keep things succinct. Further, the `proplot.figure.Figure.format`
94-
and `proplot.figure.SubplotGrid.format` commands can be used to
94+
and `proplot.gridspec.SubplotGrid.format` commands can be used to
9595
`~proplot.axes.Axes.format` several subplots at once.
9696

9797
Together, these features significantly reduce the amount of code needed to create
@@ -307,9 +307,9 @@ concise figures.
307307
setting -- for example, ``pplt.rc['abc'] = 'A.'`` or ``axs.format(abc='A.')``.
308308
This is possible because `~proplot.figure.Figure.add_subplot` assigns a unique
309309
`~proplot.axes.Axes.number` to every added subplot.
310-
* The `proplot.figure.SubplotGrid.format` command can easily format multiple subplots
310+
* The `proplot.gridspec.SubplotGrid.format` command can easily format multiple subplots
311311
at once or add colorbars, legends, panels, twin axes, or inset axes to multiple
312-
subplots at once. A `~proplot.figure.SubplotGrid` is returned by
312+
subplots at once. A `~proplot.gridspec.SubplotGrid` is returned by
313313
`proplot.figure.Figure.subplots`, and can be indexed like a list or like a 2D
314314
array (in which case the indices match the subplot grid extents).
315315
See the :ref:`user guide <ug_subplotgrid>` for details.

proplot/axes/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3035,7 +3035,7 @@ def _iter_axes(self, hidden=False, children=False, panels=True):
30353035
def number(self):
30363036
"""
30373037
The axes number. This controls the order of a-b-c labels and the
3038-
order of appearence in the `~proplot.figure.SubplotGrid` returned by
3038+
order of appearence in the `~proplot.gridspec.SubplotGrid` returned by
30393039
`proplot.figure.Figure.subplots` and `proplot.ui.subplots`.
30403040
"""
30413041
return self._number

proplot/figure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@
263263
proplot.ui.subplots
264264
proplot.figure.Figure
265265
matplotlib.figure.Figure
266-
proplot.figure.SubplotGrid
266+
proplot.gridspec.SubplotGrid
267267
proplot.axes.Axes
268268
"""
269269
_snippet_manager['figure.subplots'] = _subplots_docstring

proplot/gridspec.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,7 +1245,7 @@ def __getitem__(self, key):
12451245
12461246
Parameters
12471247
----------
1248-
key : int, slice, or 2-tuple thereof
1248+
key : int, slice, or 2-tuple
12491249
The index. If 1d then the axes in the corresponding
12501250
sublist are returned. If 2d then the axes that intersect
12511251
the corresponding `~SubplotGrid.gridspec` slots are returned.
@@ -1307,7 +1307,7 @@ def __setitem__(self, key, value):
13071307
The 1d index.
13081308
value : `proplot.axes.Axes`
13091309
The proplot subplot or its child or panel axes,
1310-
or an iterable thereof if the index was a slice.
1310+
or a sequence thereof if the index was a slice.
13111311
"""
13121312
if isinstance(key, Integral):
13131313
value = self._validate_item(value, scalar=True)

proplot/ui.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,14 @@ def subplots(*args, **kwargs):
165165
-------
166166
fig : `proplot.figure.Figure`
167167
The figure instance.
168-
axs : `proplot.figure.SubplotGrid`
169-
The axes instances stored in a `~proplot.figure.SubplotGrid`.
168+
axs : `proplot.gridspec.SubplotGrid`
169+
The axes instances stored in a `~proplot.gridspec.SubplotGrid`.
170170
171171
See also
172172
--------
173173
proplot.ui.figure
174174
proplot.figure.Figure.subplots
175-
proplot.figure.SubplotGrid
175+
proplot.gridspec.SubplotGrid
176176
proplot.figure.Figure
177177
matplotlib.figure.Figure
178178
"""

0 commit comments

Comments
 (0)