Skip to content

Commit f03f8be

Browse files
authored
Merge pull request #21770 from jklymak/auto-backport-of-pr-21631-on-v3.5.x
Backport of PR #21631 on v3.5.x
2 parents 65ace07 + a8f8204 commit f03f8be

File tree

9 files changed

+396
-274
lines changed

9 files changed

+396
-274
lines changed

.flake8

-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ per-file-ignores =
9494
tutorials/colors/colormap-manipulation.py: E402
9595
tutorials/intermediate/artists.py: E402
9696
tutorials/intermediate/constrainedlayout_guide.py: E402
97-
tutorials/intermediate/gridspec.py: E402
9897
tutorials/intermediate/legend_guide.py: E402
9998
tutorials/intermediate/tight_layout_guide.py: E402
10099
tutorials/introductory/customizing.py: E501

doc/users/prev_whats_new/whats_new_1.0.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ Sophisticated subplot grid layout
2323

2424
Jae-Joon Lee has written :mod:`~matplotlib.gridspec`, a new module for
2525
doing complex subplot layouts, featuring row and column spans and
26-
more. See :doc:`/tutorials/intermediate/gridspec` for a tutorial overview.
26+
more. See :doc:`/tutorials/intermediate/arranging_axes` for a tutorial
27+
overview.
2728

2829
.. figure:: ../../gallery/userdemo/images/sphx_glr_demo_gridspec01_001.png
2930
:target: ../../gallery/userdemo/demo_gridspec01.html

examples/lines_bars_and_markers/scatter_hist.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ def scatter_hist(x, y, ax, ax_histx, ax_histy):
8888
# ----------------
8989
#
9090
# We may equally define a gridspec with unequal width- and height-ratios to
91-
# achieve desired layout. Also see the :doc:`/tutorials/intermediate/gridspec`
92-
# tutorial.
91+
# achieve desired layout. Also see the
92+
# :doc:`/tutorials/intermediate/arranging_axes` tutorial.
9393

9494
# start with a square Figure
9595
fig = plt.figure(figsize=(8, 8))

examples/subplots_axes_and_figures/gridspec_and_subplots.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
and then remove the covered axes and fill the gap with a new bigger axes.
99
Here we create a layout with the bottom two axes in the last column combined.
1010
11-
See also :doc:`/tutorials/intermediate/gridspec`.
11+
To start with this layout (rather than removing the overlapping axes) use
12+
`~.pyplot.subplot_mosaic`.
13+
14+
See also :doc:`/tutorials/intermediate/arranging_axes`.
1215
"""
1316

1417
import matplotlib.pyplot as plt

lib/matplotlib/gridspec.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
The `GridSpec` specifies the overall grid structure. Individual cells within
66
the grid are referenced by `SubplotSpec`\s.
77
8-
See the tutorial :doc:`/tutorials/intermediate/gridspec` for a comprehensive
9-
usage guide.
8+
Often, users need not access this module directly, and can use higher-level
9+
methods like `~.pyplot.subplots`, `~.pyplot.subplot_mosaic` and
10+
`~.Figure.subfigures`. See the tutorial
11+
:doc:`/tutorials/intermediate/arranging_axes` for a guide.
1012
"""
1113

1214
import copy

0 commit comments

Comments
 (0)