\HeaderA{sccolour}{Scale: categorical colour}{sccolour}
\aliasA{sccolor}{sccolour}{sccolor}
\aliasA{scfill}{sccolour}{scfill}
\keyword{hplot}{sccolour}
\begin{Description}\relax
Create a scale for categorical colours.
\end{Description}
\begin{Usage}
\begin{verbatim}sccolour(plot = .PLOT, palette=1)\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{plot}] plot to add scale to
\item[\code{palette}] Color Brewer palette to use, see \code{\LinkA{brewer.pal}{brewer.pal}} for details.  Note that palette type is chosen automatically.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Continuous variables will automatically be converted to categorical
using \code{\LinkA{chop\_auto}{chop.Rul.auto}}.  You may want to use \code{\LinkA{chop}{chop}}
to convert the values yourself for finer control.

This scale is automatically added when you have colour in your list of
aesthetics.  For finer control, you will need to set the scale
yourself.  See the example for some ideas.
\end{Details}
\begin{Author}\relax
Hadley Wickham <h.wickham@gmail.com>
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{scale\_categorical}{scale.Rul.categorical}}, \code{\LinkA{map\_colour}{map.Rul.colour}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}p <- ggplot(movies, aes=list(x=mpaa, y=rating))
ggjitter(p, list(colour=rating))
ggjitter(p, list(colour=length))
ggjitter(p, list(colour=chop(length)))
ggjitter(p, list(colour=chop(length,3)))
sccolour(ggjitter(p, list(colour=chop(length,3))), 2)\end{ExampleCode}
\end{Examples}

