-
-
Notifications
You must be signed in to change notification settings - Fork 19.4k
ENH: Fix support for matplotlib's constrained_layout (#25261) #39394
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
ENH: Fix support for matplotlib's constrained_layout (#25261) #39394
Conversation
|
The failing tests seem totally unrelated!? |
jreback
left a comment
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.
pls add the test from the OP
| byline = by[0] if len(by) == 1 else by | ||
| fig.suptitle(f"Boxplot grouped by {byline}") | ||
| fig.subplots_adjust(bottom=0.15, top=0.9, left=0.1, right=0.9, wspace=0.2) | ||
| if not hasattr(fig, "get_constrained_layout") or not fig.get_constrained_layout(): |
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.
make a function for this
maybe_adjust_figure or similar
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.
Done. Hope this is what you had in mind.
doc/source/whatsnew/v1.3.0.rst
Outdated
|
|
||
| - Bug in :func:`scatter_matrix` raising when 2d ``ax`` argument passed (:issue:`16253`) | ||
| - | ||
| - Support matplotlib's ``constrained_layout=True`` (:issue:`25261`) |
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.
can you be slightly more verbose here. this allows passing this option right?
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.
The change just prevents pandas from doing incompatible things when a figure has constrained_layout enabled.
…atplotlib_s_constrained_layout_25261
|
thanks @mdruiter very nice! |
Uh oh!
There was an error while loading. Please reload this page.