This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Heatmap Usage - How to color cells based on row/column names after generating generic heatmap

Hello everyone

I had a question regarding possible ways of formatting heat maps. So I have a heat map like the one below, and I want to specifically highlight some cells with another color based on the name of that column. I can't find a way to do so since all I have found so far is addition of annotations and not recoloring of certain cells. Is there any other way than doing this manually?

Heatmap

Thanks :)

r

1 answer

if you use matplotlib, just add an additional plot for highlight purpose. check this : https://stackoverflow.com/questions/31290778/add-custom-border-to-certain-cells-in-a-matplotlib-seaborn-plot

Log in to answer this question.