-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
3d axes are collapsed by tight_layout #12239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The right spines on this axis has a very large value of Not sure where that axis position gets set. Hopefully someone familiar with the 3d code can help. I'd suggest it just get marked as not visible. |
I think #12241 fixes this without too many side effects. |
This same issue is also present in 2D plots with fig.tight_layout(). My program uses matplotlib as back-end in PyQt4. The issue occurs only if I try to use the "zoom" button from bar. I had to revert to 2.2.3 which fixed issue. |
@NHades It's possible to create a plot that this is an issue, but note that most plots don't have a problem. Can you open a new issue with a minimal example that triggers the axes collapse? Also, please take a look at https://matplotlib.org/api/api_changes.html#matplotlib-axes-axes-get-tightbbox-now-includes-all-artists |
Calling
fig.tight_layout()
on a figure with a 3dAxes
inside will collapse the axes into a vertical line.Minimal example:
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.
The text was updated successfully, but these errors were encountered: