-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[ENH]: align_titles #22376
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
Comments
This is probably a good first issue; you have to copy what |
Go for it. |
Thanks @anntzer . Will start working on it |
@pradhanvickey are you still working on this issue? |
We tend not to reserve issues. If there is no PR feel free to submit one. |
Is this issue still open? |
I don’t see any PR on the issue but probably @neil-gurnani is still working on it. I’ll wait a couple of days or look for a different issue. |
I've been looking at this for a couple weeks -- it doesn't appear to be as easy as expected. We can replicate the grouping of axes with the the same rowspans, as done in align_xlabels(), however, updating the title location is done in the _AxesBase class, while the label updates are done in the Figure class. Importantly, the Figure class has access to subplots, but the axesBase class does not have a way to access the subplots or a grouper we make in the figure class, where align_titles() would exist. @anntzer I'm new to Matplotlib, was wondering if there is some workaround I'm missing to share the relevant data between the classes. Basically, we'd need to share either a grouper object or subplot location information from the Figure class (where the align_titles function would be written) to the axesBase class (where the title update occurs). Do you have any thoughts or are we missing anthing? |
the title moving logic was copied from the x/ylabel moving logic, so aligning the titles should be possible after the automated moving that happens in |
I took a quick look at this again. The logic in |
Thank you for the response! That's what I tried, but I don't see how the AxesBase class in |
Each axes has a self.figure. |
@jklymak That helped! We figured it out and are working on testing and documentation |
Hello, is this issue solved? If not, my friend and I would like to work on it. |
The issue is open, so not solved yet. But as linked above, it has an associated open pull request, i.e. a solution proposal. Therefore it does not make sense to work on this issue. Please look for another topic if you want to contribute. As a side question, we often see people who ask in the way you did above coming from a CS course? Is that true for you as well? If so, which course and did they give you instructions on how to find suitable issues, in particular identifying whether an issue has already an associated open pull request and to judge whether that pull request is still active? |
Problem
There's align_xlabels and align_ylabels to align the x and y labels, but no align_titles; this would be useful e.g. for
Proposed solution
Add Figure.align_titles.
The text was updated successfully, but these errors were encountered: