[R] filled.contour colors
randhindi at gmail.com
Mon Dec 27 04:21:50 CET 2010
I am trying to set the color scale in filled.contour based on a specific
value instead of a relative position.
Specifically, I want the values below 0 to be in a gradient of green, and
those above 0 to be red. 0 would be white.
posZero = abs(min(z)) / (abs(min(z)) + max(z));
filed.contour(..., col = designer.colors(n=30, col=c("green", "white",
"red"), x=c(0, posZero, 1)))
but it does not center the white on the zero.
Thanks for your help,
View this message in context: http://r.789695.n4.nabble.com/filled-contour-colors-tp3164639p3164639.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help