Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Open
Description
Bug summary
tight_layout()
tries to set the x/y subplot parameters independently. When using a fixed-aspect Axes, this has issues because the x/y extents of the Axes cannot be independently set.
This is the root cause of#4251, with a much simpler example below. Also possibly a duplicate of#18313, but I thought it was worth a new issue as this one has a much simpler example.
Code for reproduction
importmatplotlib.pyplotaspltfig,ax=plt.subplots()ax.set_aspect('equal')ax.set_ylabel('really really really really long label',rotation=0,horizontalalignment='right')fig.tight_layout()plt.show()
Actual outcome
Expected outcome
The long axis label is contained within the figure.
Operating system
macOS
Matplotlib Version
3.4.2.post1853+gdce40267b5.d20210907
Matplotlib Backend
MacOSX
Python version
3.9.6
Jupyter version
No response
Other libraries
No response
Installation
source
Conda channel
No response