[Rd] Colour Schemes

hadley wickham h.wickham at gmail.com
Thu May 21 21:11:06 CEST 2009

>  Yes, but these things are all at the wrong conceptual level. What you
> are constructing here is a function that maps value to colour, but
> keeping it as breaks and cut values and colours instead of
> representing it as a function. Wouldn't it be nicer to build a real
> function object and have that to pass around?

This is basically what ggplot2 does behind the scenes, with the slight
addition that scales also know how to be "trained", so that the domain
can be learned from the data:

sc <- scale_colour_gradient()



More information about the R-devel mailing list