@@ -1834,21 +1834,26 @@ def subplot_mosaic(self, mosaic, *, sharex=False, sharey=False,
1834
1834
Defines the relative widths of the columns. Each column gets a
1835
1835
relative width of ``width_ratios[i] / sum(width_ratios)``.
1836
1836
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.
1838
1839
1839
1840
height_ratios : array-like of length *nrows*, optional
1840
1841
Defines the relative heights of the rows. Each row gets a
1841
1842
relative height of ``height_ratios[i] / sum(height_ratios)``.
1842
1843
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.
1844
1846
1845
1847
subplot_kw : dict, optional
1846
1848
Dictionary with keywords passed to the `.Figure.add_subplot` call
1847
1849
used to create each subplot.
1848
1850
1849
1851
gridspec_kw : dict, optional
1850
1852
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.
1852
1857
1853
1858
empty_sentinel : object, optional
1854
1859
Entry in the layout to mean "leave this space empty". Defaults
@@ -2018,7 +2023,7 @@ def _do_layout(gs, mosaic, unique_ids, nested):
2018
2023
# recursively add the nested mosaic
2019
2024
rows , cols = nested_mosaic .shape
2020
2025
nested_output = _do_layout (
2021
- gs [j , k ].subgridspec (rows , cols , ** gridspec_kw ),
2026
+ gs [j , k ].subgridspec (rows , cols ),
2022
2027
nested_mosaic ,
2023
2028
* _identify_keys_and_nested (nested_mosaic )
2024
2029
)
0 commit comments