Skip to content

Add subfigure_mosaic method to FigureBase for creating subfigure layouts - #28508

Closed
vineethsaivs wants to merge 1 commit into
matplotlib:mainfrom
vineethsaivs:add-subfigure-mosaic
Closed

vineethsaivs wants to merge 1 commit into
matplotlib:mainfrom
vineethsaivs:add-subfigure-mosaic

Conversation

@vineethsaivs

Copy link
Copy Markdown

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

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.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

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.

@jklymak

jklymak commented Jul 4, 2024

Copy link
Copy Markdown
Member

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.

@jklymak jklymak added the status: needs clarification Issues that need more information to resolve. label Jul 4, 2024
@timhoffm

timhoffm commented Jul 4, 2024

Copy link
Copy Markdown
Member

To me this feels like YAGNI. Do you have concrete examples where this will help?

@rcomer

rcomer commented Jul 4, 2024

Copy link
Copy Markdown
Member

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.

@jklymak

jklymak commented Jul 6, 2024

Copy link
Copy Markdown
Member

I'll move this to draft as its not ready for review.

@jklymak
jklymak marked this pull request as draft July 6, 2024 15:33
@tacaswell

Copy link
Copy Markdown
Member

Where #26061 got stuck was the inability to easily get the "first parent" figure.

@tacaswell

Copy link
Copy Markdown
Member

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).

@melissawm

Copy link
Copy Markdown
Member

Hi @vineethsaivs - are you interested in finishing up this PR? Please let us know if you need help or clarifications. Cheers!

@melissawm melissawm added the status: inactive Marked by the “Stale” Github Action label Jun 17, 2026
@vineethsaivs

Copy link
Copy Markdown
Author

Thanks for the ping @melissawm, and sorry for the long silence. Given the YAGNI concerns raised early on, that this version accidentally dropped subplot_mosaic (which needs to stay), and that #26061 is the approach the team leaned toward for subfigure_mosaic, I don't think it makes sense to keep pushing this one. I'll close it so it's not sitting in the queue as a stale draft; happy to help on #26061 if that gets picked back up. Thanks all.

@github-project-automation github-project-automation Bot moved this from Needs decision to Done in First Time Contributors Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: inactive Marked by the “Stale” Github Action status: needs clarification Issues that need more information to resolve. status: needs rebase topic: figures and subfigures

Projects

Development

Successfully merging this pull request may close these issues.

6 participants