Agustin,
Using breaks in in the Raster plot command and the color.legend from Plotrix
does pretty well for me.

brk = c(minValue, maxValue, by = whateverValueYouWish)
plot(raster, breaks = brk, col = custom.cols(n))
color.legend(legend = seq(minValue, maxValue, by =
whatverValueYouWish), rect.col = custom.cols(n))

Not that I don't like ggplot2, I adore the package, but I don't use it for
this purpose most of the time, but Paul's method certainly seems interesting
and might be less work?

On Thu, Jun 9, 2011 at 9:59 PM, Agustin Lobo <alobolistas@gmail.com> wrote:

> Hi!
> I'm doing
>
> par(mfrow=c(2,2))
> plot(simr)
> plot(simrlisa)
> a2 = simr>l$lisamax
> plot(l$lisamax)
> plot(simr*a2)
>
> where simr, l%lisamax and a2 are raster objects. Is there any way to
> get a common color scheme
> (i.e., setting common min and max values)?
> The color table is the same, but the scaling is independent for each
> raster object and cannot be compared.
>
> Thanks
>
> Agus
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>



-- 
best,

Adam Sparks
Post-Doctoral Fellow
IRRI
DAPO Box 7777
Metro, Manila
Los Baños, Laguna, Philippines

	[[alternative HTML version deleted]]

