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
ClusterGrid layouts: fixing longstanding issues #1393
Conversation
@mwaskom , do you know what is happening here? This is an odd place for the tests to fail as I did not touch color palettes...
|
This fixes #437 |
Matplotlib changed the color_cycle to prop_cycle a while back and must have just dropped the old name completely. I have no idea what that test was trapping warnings, which otherwise would probably have made it clear that this was happening... |
Sorry about the radio silence in the last few days. @mwaskom - do you want me to fix this test? |
No that shouldn't be part of this PR |
See #1443 |
What's the status on this PR? I would love to have access to these features! |
@dburkhardt
This is probably easier than forking the entire repo. |
This PR fixes a few of annoying things with
sns.clustermap
that have been there for since I remember.Here's a detailed list with some examples
Fix 1: Fix the clustermap scaling with size: dendrogram should not scale
The heatmap scaling has been completely broken since forever.
The code claims that it is set up so only the heatmap scales, not the dendrogram, but this is not the case:
5,5:
10,5:
5,10:
With this PR, 10,5:
With this PR 5, 10:
Fix 2: prevent squashing of row_colors when multiple annotations are given
Before:
After:
Fix 3: Extend colorbar through the whole length of dendrogram and row_colors if provided
Before:
After:
Other things that are new
I've also added parameters to clustermap to allow to change the size of dendrogram and colors.
Unfortunately I didn't manage to fix clustermaps with
square=True
, these are still broken beyond repair.