Skip to content

[ENH]: Align titles of subplots, similar to fig.align_labels #25180

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

Closed
rraadd88 opened this issue Feb 9, 2023 · 1 comment
Closed

[ENH]: Align titles of subplots, similar to fig.align_labels #25180

rraadd88 opened this issue Feb 9, 2023 · 1 comment

Comments

@rraadd88
Copy link

rraadd88 commented Feb 9, 2023

Problem

While formatting figures, along with aligning axis labels, aligning titles is often necessary. To do that, without the availability of a simple and convenient method like fig.align_labels, I find myself going through multiple rounds of

Plotting → changing y parameter of ax.set_title → replotting.

Plus the re-alignments are necessary if the figure/subplot size and layout are changed.

image

Could there be a simple and convenient way to align the titles of subplots, using maybe a method that is similar to fig.align_labels?

Proposed solution

Perhaps the general method of how labels are aligned using fig.align_labels could be extended to align titles. I am no expert on matplotlib's API, but I wonder if cbook.Grouper could do this.

FYI, I know there is a way to align titles using subfigures and suptitles. But I would prefer not to convert subplots to subfigures only to align titles.

@jklymak
Copy link
Member

jklymak commented Feb 9, 2023

I don't think there is any huge blocker on that. But lets keep discussion in #22376

@jklymak jklymak closed this as not planned Won't fix, can't repro, duplicate, stale Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants