Binary heatmap using R
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")
• 3,991 views
•
link
1 answer
https://stackoverflow.com/questions/41560453/colour-zero-values-in-heatmap-2
Use heatmap.2 and add na.color = "light blue".
• 0 views
•
link
Log in to answer this question.
What is the error message you are receiving? Can you also provide an example of your data, cannot visualise it based on your description.
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