scanpy icon indicating copy to clipboard operation
scanpy copied to clipboard

mutiple heatmap annotation

Open wangjiawen2013 opened this issue 4 years ago • 6 comments

Hi, Does scanpy support mutliple heatmap annotation now, just like this following heatmap, where "cyl" can be tissue source, "mpg" can be age and "am" can be time point, and so on 006-heatmap-heatmap-annotation-1

wangjiawen2013 avatar Jan 27 '21 11:01 wangjiawen2013

This would definitely be useful. @fidelram, you were thinking of including more seaborn heat map features like this, right?

ivirshup avatar Jan 28 '21 00:01 ivirshup

Indeed something like this would be nice. Do we have an example using seaborn ?

fidelram avatar Jan 28 '21 17:01 fidelram

here are some examples, may they help https://stackoverflow.com/questions/27988846/how-to-express-classes-on-the-axis-of-a-heatmap-in-seaborn https://stackoverflow.com/questions/60177861/plotting-annotated-heatmaps-clustermaps-with-multiple-legends-in-seaborn https://stackoverflow.com/questions/61816216/seaborn-clustermap-with-two-row-colors

wangjiawen2013 avatar Jan 29 '21 00:01 wangjiawen2013

The clustermap (docs) function does this. It doesn't do legends though, so that's something we would need to add ourselves.

ivirshup avatar Jan 30 '21 04:01 ivirshup

Legends can be added now. sns.palplot(palette) https://www.chrisremmel.com/post/seaborn-color-labels/

wangjiawen2013 avatar Feb 02 '21 09:02 wangjiawen2013

Hello, was capability of adding multiple annotations to heatmaps implemented in scanpy?

ashleighthomas avatar Mar 13 '24 00:03 ashleighthomas