-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Compressed layout moves suptitle #28734
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
Conversation
6cd82cb
to
68903da
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't imagine anyone will complain if this doesn't get a deprecation.
I belatedly found the plot_children function so can now visualise that I'm using the blue rectangle to position the title. |
suptitle.get_in_layout() and suptitle._autopos): | ||
x, _ = suptitle.get_position() | ||
suptitle.set_position( | ||
(x, layoutgrids[fig].get_inner_bbox().y1 + 0.02)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does 0.02 come from? Does it work well with different font sizes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0.02 is the default space between the top of this title and the top of the figure without constrained layout, so I chose it to be consistent with that.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though thinking about it, it's probably better to do something consistent with the make_margin_suptitles function which would define the spacing if you are using normal constrained layout or if compressed layout is compressing things horizontally. That ultimately uses the configurable h_pad.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
68903da
to
146ba53
Compare
Docs are broken on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still looks good to me!
PR summary
Closes #27866. I found myself wanting this today. The code from the issue now produces
I am at a loss how to provide a deprecation path for this.
PR checklist