-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add subfigure_mosaic method to FigureBase for creating subfigure layouts #28508
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
base: main
Are you sure you want to change the base?
Conversation
Implemented subfigure_mosaic method to build complex GridSpec layouts using ASCII art or nested lists. This method supports shared axes, custom width and height ratios, and empty sentinel handling for creating a layout of SubFigures within a figure.
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.
Thank you for opening your first PR into Matplotlib!
If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks.
You can also join us on gitter for real-time discussion.
For details on testing, writing docs, and our review process, please see the developer guide
We strive to be a welcoming and open project. Please follow our Code of Conduct.
I'm not sure such a feature is really wanted, but even if it is, you appear to have removed subplot_mosaic which obviously has to stay. |
To me this feels like YAGNI. Do you have concrete examples where this will help? |
This would close #25949. Note that there is an existing orphaned PR #26061. I haven’t looked at the detail but #28170 (comment) suggests we might need #28177 first. |
I'll move this to draft as its not ready for review. |
Where #26061 got stuck was the inability to easily get the "first parent" figure. |
I'm in favor of this feature, (although I don't think that it needs to support sharex/sharey) either via this PR or the other one (on first glance I'm partial to the other one, but that may just be familiarity). I think dropping subplot_mosaic was a typo (as subfigure_mosaic is defined twice). |
Implemented subfigure_mosaic method to build complex GridSpec layouts using ASCII art or nested lists. This method supports shared axes, custom width and height ratios, and empty sentinel handling for creating a layout of SubFigures within a figure.
PR summary
This change allows users to create intricate subfigure layouts within a matplotlib figure, enhancing the flexibility and usability of the plotting library. The new feature enables the creation of subfigures using a mosaic layout, providing more control over the figure design.
PR checklist