\HeaderA{scale\_categorical}{Scale: general categorical}{scale.Rul.categorical}
\keyword{hplot}{scale\_categorical}
\keyword{internal}{scale\_categorical}
\begin{Description}\relax
Create a categorical scale for the specified variable
\end{Description}
\begin{Usage}
\begin{verbatim}scale_categorical(variable="x", name="", expand=c(0,0), transform="as.numeric", ...)\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{variable}] variable that this scale is for
\item[\code{name}] name of the scale (used in the legend)
\item[\code{expand}] expansion factor for scale
\item[\code{transform}] transformation function
\item[\code{...}] 
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
A categorical scale is a simple mapping from the levels of
the categorical factor to values of the aesthetic attribute.
These mappings are created by the aesthetic mapping functions
\code{\LinkA{map\_colour}{map.Rul.colour}}, and \code{\LinkA{map\_linetype}{map.Rul.linetype}}.
You will want to refer to those to see the possible options
that can be used to control the mapping.

You should not call this function yourself.  Instead use:

\item \code{\LinkA{pscategorical}{pscategorical}}
\item \code{\LinkA{sccolour}{sccolour}}
\item \code{\LinkA{sclinetype}{sclinetype}}
\item \code{\LinkA{scshape}{scshape}}

If you use a continuous variable with this scale, it will automatically
be converted to a categorical variable using \code{\LinkA{chop\_auto}{chop.Rul.auto}}.  If
you want more control over the conversion you will want to use
\code{\LinkA{chop}{chop}} yourself.  However, be careful to do all the chopping
in one place, otherwise you may end up with different scales in different grobs.

This categorical scale places evenly spaces the levels of the factor
along the intergers.  If you want to change the order of the levels
you will need to change the levels in the original factor.
\end{Details}
\begin{Author}\relax
Hadley Wickham <h.wickham@gmail.com>
\end{Author}
\begin{Examples}
\begin{ExampleCode}\end{ExampleCode}
\end{Examples}

