Hello R-Users!
I'm using a heatmap to visualize a matrix of values between -1 and 3.
How can I set the colors so that white is zero, below zero is blue of
increasing intensity towards -1 and above zero is red of increasing
intensity towards red?
I tried like this (using the marray and gplots packages from bioconductor):
mcol <- maPalette(low="blue", mid="white", high="red",k=100)
heatmap.2(my_matrix, col=mcol)
But white does not correspond to zero, because the value distribution is
not symmetrical, so that zero is not in the middle.
Is it somehow possible to create a color palette with white centered at
zero?
Nick Fankhauser
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.