Bug summary
When I run the code below
compressed.png and constrained.png are (visually) identical, and the axes in the left of each sub-figure are getting smaller and smaller
tight.png has all the axes in each sub-figure the same sizes, but those sizes are wrong
none.png is correct (all the sizes remain unchanged, the sizes are OK) but the axes decorations overlap the plotting area
For your convenience I've uploaded the image files produced by my code.
Thank you in advance — gb
This behaviour was brought to my attention by
https://stackoverflow.com/questions/79614691/why-are-the-subplots-in-the-subfigures-getting-smaller
Code for reproduction
import matplotlib.pyplot as plt
def test(layout):
fig = plt.figure(figsize=(12, 16), layout=layout)
figures = fig.subfigures(4, 2)
for f in figures.flatten():
gs = f.add_gridspec(3, 2)
for i in range(3):
f.add_subplot(gs[i, 0]).plot()
f.add_subplot(gs[:, 1]).plot()
fig.savefig(layout + ".png")
test("compressed")
test("constrained")
test("none")
test("tight")
Actual outcome




Expected outcome
Something like none.png w/o the axes decoration overlapping the plot areas
Additional information
No response
Operating system
Open Suse Tumbleweed
Matplotlib Version
3.10.1
Matplotlib Backend
qtagg
Python version
Python 3.13.3
Jupyter version
No response
Installation
Linux package manager
Bug summary
When I run the code below
compressed.pngandconstrained.pngare (visually) identical, and the axes in the left of each sub-figure are getting smaller and smallertight.pnghas all the axes in each sub-figure the same sizes, but those sizes are wrongnone.pngis correct (all the sizes remain unchanged, the sizes are OK) but the axes decorations overlap the plotting areaFor your convenience I've uploaded the image files produced by my code.
Thank you in advance — gb
This behaviour was brought to my attention by
https://stackoverflow.com/questions/79614691/why-are-the-subplots-in-the-subfigures-getting-smaller
Code for reproduction
Actual outcome
Expected outcome
Something like
none.pngw/o the axes decoration overlapping the plot areasAdditional information
No response
Operating system
Open Suse Tumbleweed
Matplotlib Version
3.10.1
Matplotlib Backend
qtagg
Python version
Python 3.13.3
Jupyter version
No response
Installation
Linux package manager