heatmap() in r assigning incorrect scale color to only first column values
1
0
Entering edit mode
8 months ago
Jen ▴ 70

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 • 642 views
ADD COMMENT
2
Entering edit mode
8 months ago
bk11 ★ 2.4k

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))
ADD COMMENT
0
Entering edit mode

Thanks that worked :) Much appreciated.

ADD REPLY

Login before adding your answer.

Traffic: 2160 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6