Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 65daf92

Browse files
timhoffmmeeseeksmachine
authored andcommitted
Backport PR #24764: DOC: subplot_mosaic tutorial - clarify ratios keywords used directly
1 parent a22a334 commit 65daf92

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tutorials/provisional/mosaic.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,9 @@ def identify_axes(ax_dict, fontsize=48):
210210
# (the same as `.Figure.subplots`).
211211
#
212212
# In this case we want to use the input to specify the arrangement,
213-
# but set the relative widths of the rows / columns via *gridspec_kw*.
213+
# but set the relative widths of the rows / columns. For convenience,
214+
# `.gridspec.GridSpec`'s *height_ratios* and *width_ratios* are exposed in the
215+
# `.Figure.subplot_mosaic` calling sequence.
214216

215217

216218
axd = plt.figure(constrained_layout=True).subplot_mosaic(
@@ -227,9 +229,10 @@ def identify_axes(ax_dict, fontsize=48):
227229
identify_axes(axd)
228230

229231
###############################################################################
230-
# Or use the {*left*, *right*, *bottom*, *top*} keyword arguments to
232+
# Other `.gridspec.GridSpec` keywords can be passed via *gridspec_kw*. For
233+
# example, use the {*left*, *right*, *bottom*, *top*} keyword arguments to
231234
# position the overall mosaic to put multiple versions of the same
232-
# mosaic in a figure
235+
# mosaic in a figure.
233236

234237
mosaic = """AA
235238
BC"""

0 commit comments

Comments
 (0)