[R] comparing heatmaps
Benton, Paul
hpaul.benton08 at imperial.ac.uk
Sun Mar 27 22:54:59 CEST 2011
Dear all,
I've been trying to find how to compare tow different heatmaps but I'm having trouble getting the colors bar to be the same. I'm doing something like the following:
library(gplots)
dat<-cor(matrix(rnorm(100, m=10), nrow=10))
mat<-cor(matrix(rnorm(100), nrow=10))
dev.new()
heatmap.2(mat, Rowv=NA, Colv=NA, col=redgreen(75), symm=TRUE, trace="none", dendrogram="none",
main = paste("Correlation Matrix for time delay at ", sep=""))
dev.new()
heatmap.2(dat, Rowv=NA, Colv=NA, col=redgreen(75), symm=TRUE, trace="none", dendrogram="none",
main = paste("Correlation Matrix for time delay at ", sep=""))
You'll probably notice that the color bar at the top left isn't the same scale. How do I do this?
Thanks,
Paul
More information about the R-help
mailing list