[R] fixed color scale for a series of contour plots

Meyners, Michael, LAUSANNE, AppliedMathematics Michael.Meyners at rdls.nestle.com
Tue Nov 3 14:51:53 CET 2009


You don't tell us which function you use, but fixing the zlim argument
in image or related functions should do the trick.
M.

> -----Original Message-----
> From: r-help-bounces at r-project.org 
> [mailto:r-help-bounces at r-project.org] On Behalf Of Marion Dumas
> Sent: Dienstag, 3. November 2009 14:38
> To: r-help at r-project.org
> Subject: [R] fixed color scale for a series of contour plots
> 
> Hello,
> I am having trouble figuring out how to create a color scale 
> that will be consistent across multiple contour plots. What I 
> would like is to plot a series of contour or image plots for 
> different subsets of a data set but make sure that the color 
> key stays fixed so that the plots are easily comparable. That 
> is I need a map from the range of values of the entire data 
> set to the color scale and keep then use this color scale for 
> all plots + be able to display the color bar as a legend next 
> to the plot. This sounds trivial, but I can't find useful 
> hints in the documentation of the color arguments of the 
> different plots.
> Thanks so much for any help
> Best
> Marion
> 
> ______________________________________________
> R-help at 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.
> 




More information about the R-help mailing list