Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Labels
Milestone
Description
Bug report
Bug summary
Not sure if this an expected behaviour, but the colorbar seems to be ignored when usingtight_layout
. Example taken from the "Constrained Layout Guide" (https://matplotlib.org/3.1.3/tutorials/intermediate/constrainedlayout_guide.html#colorbars).
Code for reproduction
arr=np.arange(100).reshape((10,10))fig,axs=plt.subplots(2,2,figsize=(4,4),constrained_layout=True)foraxinaxs.flat:im=ax.pcolormesh(arr)fig.colorbar(im,ax=axs,shrink=0.6)plt.tight_layout()
Actual outcome
Expected outcome
This is the outcome before callingplt.tight_layout()
Matplotlib version
- Operating system: Fedora 31
- Matplotlib version: 3.1.3 from conda defaults (3.2.1 from conda-forge behave similarly)
- Matplotlib backend (
print(matplotlib.get_backend())
): Qt5Agg - Python version: 3.7.6
- Jupyter version (if applicable):
- Other libraries: