Repository navigation
Add subfigure_mosaic method to FigureBase for creating subfigure layouts - #28508
vineethsaivs wants to merge 1 commit into
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.
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). |
|
Hi @vineethsaivs - are you interested in finishing up this PR? Please let us know if you need help or clarifications. Cheers! |
|
Thanks for the ping @melissawm, and sorry for the long silence. Given the YAGNI concerns raised early on, that this version accidentally dropped |
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