Binary heatmap using R
1
0
Entering edit mode
2.2 years ago

Hi everybody.

I would like to do a binary heatmap on R, made only of 0/1, but if I have lines with only zero values the graph does not shown them and I see a blank space.

This is my code:

heatmap(x , Rowv = NA, Colv = NA, col = c("light blue", "red"), xlab = "xlab" , ylab="ylab"  , main = "title")
heatmap R • 2.5k views
ADD COMMENT
0
Entering edit mode

What is the error message you are receiving? Can you also provide an example of your data, cannot visualise it based on your description.

ADD REPLY
0
Entering edit mode

i did not have any error, just my graph is blanked instead of being coloured. For example

0000 = all blue 0001 = 3 blue 1 red 1111 = 4 red

But the first line is blank in my resulting graph

ADD REPLY
2
Entering edit mode
2.2 years ago
K.patel5 ▴ 140

https://stackoverflow.com/questions/41560453/colour-zero-values-in-heatmap-2 Use heatmap.2 and add na.color = "light blue".

ADD COMMENT

Login before adding your answer.

Traffic: 2226 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