On Mon, Mar 28, 2011 at 6:36 PM, Benton, Paul <hpaul.bento...@imperial.ac.uk> wrote: > Benno, > > That helps but it only makes the color bar symmetrical. I want to be able to > compare 2 different heatmaps so that 0.7 (for example) is always the same > tone of green and not shifted slightly. Is this possible? > > Paul
>From what I can see it is not possible with heatmap.2. If you are looking for a function that can create a heatmap with a color legend, you can try function image.plot in the package fields, or the function labeledHeatmap in the package WGCNA. Neither of them has the histogram-enhanced color legend, but labeledHeatmap definitely takes an argument zlim which you can set to say c(-1, 1) to obtain a consistent color scale, and the last time I used image.plot (which was quite some time ago), that function also took that argument. See examples listed in help(labeledHeatmap) for a few examples of what it can do. Peter ______________________________________________ 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.