Entering edit mode
Tim Smith
★
1.1k
@tim-smith-1532
Last seen 10.4 years ago
Hi,
I was just trying to get a heatmap of sorts with data that has only 3
values (-1,0,1). For example:
----------------------------------
library(stats)
eg <- matrix(-1:1,10,10)
rownames(eg) <- LETTERS[1:10]
colnames(eg) <- c(1:10)
heatmap(eg)
-------------------------------
However, the heatmap that I get has 5 colors. What do I need to do so
that only 3 colors (each representing one of 1,0,-1) are displayed?
thanks!
[[alternative HTML version deleted]]