Closed
Description
Calling fig.tight_layout()
on a figure with a 3d Axes
inside will collapse the axes into a vertical line.
Minimal example:
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
for tighten in False,True:
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.plot([1,2], [1,2], [1,2])
if tighten:
fig.tight_layout()
plt.show()
The following figures are produced with python 3.7, matplotlib 3.0.0 (also master):
There's also a warning that says
/home/user/matplotlib-env/lib/python3.7/site-packages/matplotlib/tight_layout.py:177: UserWarning: The left and right margins cannot be made large enough to accommodate all axes decorations.
but that's hardly surprising since there's no room for any decorations whatsoever.
May or may not be related to the recent-ish issues fixed by #11739 and #11627.