[R-sig-Geo] setting breaks in colorramps
PepET
pep.bioalerts at gmail.com
Fri Nov 25 14:03:50 CET 2011
Dear subscribes,
I have been looking but could not find the exact answer for my question,
which may seem really from a newbie....
I have several rasters and I want to plot them using a color gradient / ramp
going from red to grey untill 0 and from grey to green from 0 onwards.
I have managed to create a ramp:
#piba is a raster
myramp<-colorRampPalette( c("red", "white","green"), space="rgb",
breaks=c(cellStats (piba,min),0,cellStats (piba,max)))
but the problem there is that I want negative cells to go from red to white
and positive cells from white to green. Using this ramp I do not enshure
that. I also used breaks option in the plot, but then the display is a
single color.
Any help? THANK YOU!
Pep
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/setting-breaks-in-colorramps-tp7031046p7031046.html
Sent from the R-sig-geo mailing list archive at Nabble.com.
More information about the R-sig-Geo
mailing list