[R-sig-Geo] Same color scale

Manuel Schneider manuel.schneider at art.admin.ch
Wed Nov 23 15:21:39 CET 2011


 <alain.reymond <at> wsl.ch> writes:
> 
> Dear all,
> I want to compare 2 raster data map where probability values between 0 and 1
are not the same (different
> mix-max values).
> For this I want to apply to both map the same color scale (i.e. 0-0.1 red,
0.1-0.2 blue etc.) in an automatic
> way without doing it individually for each map.

Dear Alain

not entirely sure whether I really understand your question, but maybe
hsv(prob,1,1) or hsv(round(prob,1),1,1) or rainbow(10)[ceiling(prob*10)] could
also do the job when using image() to plot

Abw



More information about the R-sig-Geo mailing list