Closed
Description
Bug summary
When titles are long and wrapped, constrained layout doesn't leave enough room for them.
Code for reproduction
import matplotlib.pyplot as plt
fig, ax_arr = plt.subplots(2, 2, figsize=(3, 3), layout="constrained")
fig.suptitle("suptitle that is clearly too long in this case", wrap=True)
ax_arr[1, 0].set_title("axes title that is too long for the size", wrap=True)
plt.savefig("test.png")
Actual outcome
Expected outcome
Enough space for the titles.
Additional information
There's no problem if the titles have an explicit new line ("\n"), so this seems to be specific to the wrapping.
Operating system
RHEL7
Matplotlib Version
3.7.0 and main
Matplotlib Backend
QtAgg
Python version
3.11.0
Jupyter version
N/A
Installation
conda