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
______________________________________________
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.

Reply via email to