Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.2k
ENH: add supxlabel and supylabel#17524
Conversation
d53bc29 tod1a0cc4Comparetimhoffm commentedMay 28, 2020
Have you considered that people might want suplabels on parts of a grid? e.g. columns 1 and 2 share an xlabel while column 0 has it's own label. I'm not claiming that you should implement it now or even that it's necessary, but the desire may come up. If we consider this a reasonable extension, we should at least think about if an extension of the proposed API in that direction is possible and staight forward. |
jklymak commentedMay 28, 2020
Right now the API is the same as There are two somewhat orthogonal issues here.
|
jklymak commentedMay 29, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
i.e. this figure just has suptitles for each subpanel, but was made w two subpanels, and could just as easily have supx and supylabels (from#17437) |
sks-2020 commentedAug 24, 2020
jklymak commentedAug 24, 2020
@sks-2020 What do you anticipate wanting to do with gridspec that the sub-panel functionality won't give you? |
sks-2020 commentedAug 24, 2020
@jklymak I think the subpanel function will solve what I am hoping to do. My issue is the same as outlined here: I found a possible way of solving this, but doesn't use the neat layout option of using gridspec: In summary, I have a gridspec subplots layout within another gridspec. I do the plotting part in the inner grid and need the labeling flexibility in the outer grid. At the moment, using the current release of matplotlib, I can only achieve this using text annotations. Inbuilt functions (like supxlabel, supylabel, supxticklabels, supyticklabels, suptitle), for the outer grid, will be very useful. |
jklymak commentedSep 16, 2020
@mwaskom This is the suplabel PR. This doesn'treally require the other PR, but would be nice to do it after.... |
mwaskom commentedSep 16, 2020
I'm afraid I don't know where to find it in the diff, but is the default font size here bigger than regular axes labels? I'm not sure I've ever needed to add a "suplabel" pertaining to multiple axes that have existing, distinct labels. My use-case is almost always a situation where I have multiple subplots with shared axes and I want to add a single label to identify them. In that case, I'd want to the label to have the same size as a normal axis label. Also, will these suplabels be tighter against the axes when there are no first-order labels? I won't assert or claim to know which is a more common usecase, but I do think it's an application this PR should consider... |
jklymak commentedSep 16, 2020
I think they may be larger by default (just like suptitle) but the user can change this. If there are no individual labels and you use constrained_layout the suplabels will be tight against the axes. Can likely be made to work with tight_layout as well. With no layout manager the whole thing is a bit of a mess anyhow. As noted above, the suplables will be centered on the figure, not the spines or some other measure of what the label is supposed to span. That may or may not be acceptable depending on axes decorations, but it's a lot simpler. |
e2d9131 toacc550aComparejklymak commentedOct 14, 2020
This is ready for review, and closes at least one feature request, and something seaborn would like. |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
dfe0086 to2c51392CompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
e5e4813 todfd9ed0Compareb5a9247 to04b736fCompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
dopplershift commentedNov 24, 2020
Were we relying on Travis to run any unique test configurations? I'm wondering why test lines execute has dropped so much... |
QuLogic commentedNov 24, 2020
Is it not posting? It seems to have run... Not everything is installed in Azure Pipelines, so I don't think it covers the same things. |
dopplershift commentedNov 24, 2020
QuLogic commentedNov 24, 2020
Oh, I did not notice the date. I guess we'll put this back on the meeting agenda. |
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
tacaswell left a comment
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.
This is very nice looking!
I also really like the test images, they make it very clear what is going on.
tacaswell commentedDec 3, 2020
Anyone can merge on CI green. |
QuLogic commentedDec 3, 2020
Code coverage is normal again, since this ran with GitHub Actions after@tacaswell's commit. |
jklymak commentedDec 3, 2020
Thanks for everyone's reviews, and for@QuLogic for fixing codecov! |



Uh oh!
There was an error while loading.Please reload this page.
PR Summary
UPDATE: 10 Oct 2020, this still works as below.
There are a couple of fixes to padding in
suptitleplacement inconstrained_layout.This PR adds
supxlabelandsupylabel. Works with tight_layout and the new constrained_layout. Not so well with no layout manager ;-)Closes#11147
PR Checklist