\HeaderA{scrgb}{Scale: colour (rgb)}{scrgb}
\keyword{hplot}{scrgb}
\begin{Description}\relax
Scale continuous variables to red, green and blue components of colour.
\end{Description}
\begin{Usage}
\begin{verbatim}scrgb(plot = .PLOT, to=list())\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{plot}] plot to add scale to
\item[\code{to}] named list of target ranges (r.to, g.to, b.to, a.to)
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The RGB colour space is NOT perceptually uniform.  Use
this scale with care.  It is extremely ill-advised to map variables to more
than one of r, g, b, or a.

Note: alpha mappings only work with the Quartz and PDF devices.
\end{Details}
\begin{Author}\relax
Hadley Wickham <h.wickham@gmail.com>
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{map\_colour\_rgb}{map.Rul.colour.Rul.rgb}}, \code{\LinkA{rgb}{rgb}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}p <- scrgb(ggplot(movies, aes=list(y=rating, x=year)))
ggpoint(p, list(r=year))
ggpoint(p, list(b=rating))
ggpoint(p, list(b=rating, r=1))
scrgb(ggpoint(p, list(b=rating, r=1)), list(b.to=c(0.25,0.75)))
ggpoint(p, list(b=rating, r=year))
ggpoint(p, list(b=rating, r=year, g=year))\end{ExampleCode}
\end{Examples}

