Skip to content
Prev 207649 / 398502 Next

heatmap.2 color range

thanks, 
I think I got the color ranges down, however, I just realized that the
colors don't match the data.  When I execute:
grad <- ifelse(randMat > 5,yelPal,ifelse(randMat<1.5,redPal,bluPal))    
the grad matrix contains the correct hex codes corresponding to the randMat
data matrix  but when I run:

heatmap(randMat, Rowv=NA, Colv=NA, col = grad, scale="none",
margins=c(5,10))

The colors displayed don't match up.  I'm not sure if it's re-ordering the
data somehow but I'm not getting any warning or errors and can't find any
similiar postings.