Uh oh!
There was an error while loading. Please reload this page.
Add helper for setting axis limits in facetgrid - #7046
Conversation
mathause
left a comment
There was a problem hiding this comment.
Small comment but I am also fine to merge as is.
| # Find the plot with the largest xlim values: | ||
| for ax in self.axes.flat: | ||
| get_lim: None | Callable[[], tuple[float, float]] = getattr( | ||
| ax, f"get_{k}lim", None | ||
| ) | ||
| if get_lim: | ||
| l0, l1 = get_lim() | ||
| l0_old, l1_old = lims_largest[k] | ||
| lims_largest[k] = (min(l0, l0_old), max(l1, l1_old)) |
There was a problem hiding this comment.
You could potentially avoid some dict lookups and only assign them at the end - but I don't think it really matters.
There was a problem hiding this comment.
Hmm, I'm not seeing what you're seeing. Feel free to push a commit if you like.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Mathias Hauser <mathause@users.noreply.github.com>
Illviljan
commented
Sep 23, 2022
Thanks @mathause! I'll merge this in a few days. |
headtr1ck
commented
Sep 23, 2022
You don't need to specify |
keewis
left a comment
There was a problem hiding this comment.
a bit late, but I've got a few comments that might be good to address. The outdated parameter types should definitely be updated but I won't insist on renaming the variables.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Illviljan
commented
Sep 26, 2022
To be continued in #7082. |
This PR adds a helper method that sets the same axis limits for all plots in a facetgrid.
Helpful when
Split up from #6778.