\HeaderA{scgradient}{Scale: colour gradient}{scgradient}
\aliasA{scfillgradient}{scgradient}{scfillgradient}
\keyword{hplot}{scgradient}
\begin{Description}\relax
Scale a continuous variable along a colour gradient.
\end{Description}
\begin{Usage}
\begin{verbatim}scgradient(plot = .PLOT, low='red', mid='white', high="black", midpoint=0, range=c(NA,NA))\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{plot}] plot object to add scale to
\item[\code{low}] colour at low end of scale
\item[\code{mid}] colour at middle of scale
\item[\code{high}] colour at top of scale
\item[\code{midpoint}] definition of midpoint
\item[\code{range}] range to scale data to
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
This scale creates a continuous colour gradient from the
low colour to the mid colour to high colour, as defined in the
arguments.
\end{Details}
\begin{Author}\relax
Hadley Wickham <h.wickham@gmail.com>
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{sccolour}{sccolour}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}p <- scgradient(ggplot(movies, aes=list(x=mpaa, y=rating)))
ggjitter(p, list(colour=rating))
ggjitter(p, list(colour=length))
p <- ggjitter(p, list(colour=rating))
scgradient(p, low="yellow")
scgradient(p, high="green", midpoint=5)\end{ExampleCode}
\end{Examples}

