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
fig.suptitle() still scrambled with ax.title when using tight_layout() #5355
Comments
|
Any update on this? |
|
My guess is that there is no good reason this could not be made to work in |
|
I'm going to close this as fixed in |
|
Unfortunately this is still not working in matplotlib 3.0.2 using %matplotlib notebook
import numpy as np
from matplotlib import pyplot as plt
# example with low height
fig, axes = plt.subplots(nrows=2, ncols=2, figsize=(6, 3), constrained_layout=True)
axes[0,0].plot([0,1,2], label='test')
axes[1,0].plot([0,1,2], label='test 2')
fig.suptitle('a longer title') But now increasing the plot height using the modified example [...]
fig, axes = plt.subplots(nrows=2, ncols=2, figsize=(6, 12), constrained_layout=True)
[...]shows the following overlapping title: Is there anything that can be done here to find out why this is not taking into account the larger plot dimensions? |
|
I can reproduce that. Basically the baseline of the subtitle is being aligned properly, but its overlapping the tick label and the descending "g" is going too deep. I think its all fixable. However, I do have to make the figure quite large for this to happen. |
|
Can you open a new issue? This is really a refinement of the old one... |
|
what's the solution to this? |
|
suptitle is not compatible with |
|
Can/should we warn if tight_layout is used with suptitle? |



I don't know if the suptitle() is implemented via
OffsetBoxes, but theWhat's Newtext mentioning this:made me hope that I could finally use fig.suptitle() with ax.title and fig.tight_layout() without manually adapting the margins. Alas, this still seems to be an issue:
Version: '1.5.0rc3+207.g54ead93' on OSX, self compiled using
python setup.py installwith conda's Python 3.5Code:
The text was updated successfully, but these errors were encountered: