This is a test version of Biostars. For the public version, visit https://www.biostars.org.
heatmap() in r assigning incorrect scale color to only first column values

I have made a heat map in r using heatmap() and everything looks good except that the color assigned to the values in the first column and the first column only are incorrect. Very strange. See below for my current code and an image of my data and the heatmap I've generated. Any idea why this is?

heatmap(Hallmark3, Colv = NA, Rowv = NA, scale="column", cexRow=.8, cexCol=1, col = viridis(256))

enter image description here

r heatmap

1 answer

You are scaling the data in scale = "column". Please turn it off as scale = "none" to see color in un-scaled data. This will be your code-

heatmap(Hallmark3, Colv = NA, Rowv = NA, scale="none", cexRow=.8, cexCol=1, col = viridis(256))

Thanks that worked :) Much appreciated.

Log in to answer this question.