@@ -1834,21 +1834,26 @@ def subplot_mosaic(self, mosaic, *, sharex=False, sharey=False,
18341834 Defines the relative widths of the columns. Each column gets a
18351835 relative width of ``width_ratios[i] / sum(width_ratios)``.
18361836 If not given, all columns will have the same width. Equivalent
1837- to ``gridspec_kw={'width_ratios': [...]}``.
1837+ to ``gridspec_kw={'width_ratios': [...]}``. In the case of nested
1838+ layouts, this argument applies only to the outer layout.
18381839
18391840 height_ratios : array-like of length *nrows*, optional
18401841 Defines the relative heights of the rows. Each row gets a
18411842 relative height of ``height_ratios[i] / sum(height_ratios)``.
18421843 If not given, all rows will have the same height. Equivalent
1843- to ``gridspec_kw={'height_ratios': [...]}``.
1844+ to ``gridspec_kw={'height_ratios': [...]}``. In the case of nested
1845+ layouts, this argument applies only to the outer layout.
18441846
18451847 subplot_kw : dict, optional
18461848 Dictionary with keywords passed to the `.Figure.add_subplot` call
18471849 used to create each subplot.
18481850
18491851 gridspec_kw : dict, optional
18501852 Dictionary with keywords passed to the `.GridSpec` constructor used
1851- to create the grid the subplots are placed on.
1853+ to create the grid the subplots are placed on. In the case of
1854+ nested layouts, this argument applies only to the outer layout.
1855+ For more complex layouts, users should use `.Figure.subfigures`
1856+ to create the nesting.
18521857
18531858 empty_sentinel : object, optional
18541859 Entry in the layout to mean "leave this space empty". Defaults
@@ -2018,7 +2023,7 @@ def _do_layout(gs, mosaic, unique_ids, nested):
20182023 # recursively add the nested mosaic
20192024 rows , cols = nested_mosaic .shape
20202025 nested_output = _do_layout (
2021- gs [j , k ].subgridspec (rows , cols , ** gridspec_kw ),
2026+ gs [j , k ].subgridspec (rows , cols ),
20222027 nested_mosaic ,
20232028 * _identify_keys_and_nested (nested_mosaic )
20242029 )
0 commit comments