Great, I will have a look at it! Thanks!
On Mon, Dec 27, 2010 at 12:52 PM, Jim Lemon [via R] <ml-node+3164904-680716452-206...@n4.nabble.com> wrote: > On 12/27/2010 02:21 PM, randhindi wrote: >> >> Hi, >> >> 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. >> >> I tried: >> >> 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. > Hi Rand, > Have a look at the examples for color2D.matplot in the plotrix package. > These show how to use color.scale to produce a set of colors like you > describe above. > > Jim > > ______________________________________________ > [hidden email] 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. > > > ________________________________ > View message @ > http://r.789695.n4.nabble.com/filled-contour-colors-tp3164639p3164904.html > To unsubscribe from filled.contour colors, click here. -- View this message in context: http://r.789695.n4.nabble.com/filled-contour-colors-tp3164639p3164970.html Sent from the R help mailing list archive at Nabble.com. [[alternative HTML version deleted]] ______________________________________________ R-help@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.