-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Open
Labels
Documentationstatus: confirmed bugtopic: geometry managerLayoutEngine, Constrained layout, Tight layoutLayoutEngine, Constrained layout, Tight layout
Description
Bug summary
The text is added below the axes by calling ax.text(0.0, -0.5, f"My Text") in a figure with constrained layout, but the initial save does not contain the text.
Code for reproduction
import matplotlib.pyplot as plt
fig = plt.figure(layout='constrained')
ax = fig.add_subplot()
ax.text(0.0, -0.5, f"My Text")
plt.savefig('save1.png')
plt.savefig('save2.png')Actual outcome
save1.png
save2.png
Expected outcome
save1.png and save2.png should be identical and both contain "My Text".
Additional information
No response
Operating system
No response
Matplotlib Version
3.10.8
Matplotlib Backend
No response
Python version
No response
Jupyter version
No response
Installation
None
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Documentationstatus: confirmed bugtopic: geometry managerLayoutEngine, Constrained layout, Tight layoutLayoutEngine, Constrained layout, Tight layout