\HeaderA{ggjitter}{Grob function: jittered points}{ggjitter}
\keyword{hplot}{ggjitter}
\begin{Description}\relax
Add jittered points to a plot
\end{Description}
\begin{Usage}
\begin{verbatim}ggjitter(plot = .PLOT, aesthetics=list(), ..., data=NULL)\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{plot}] the plot object to modify
\item[\code{aesthetics}] named list of aesthetic mappings, see details for more information
\item[\code{...}] other options, see details for more information
\item[\code{data}] data source, if not specified the plot default will be used
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
This is useful when plotting points with a categorical axis so to
avoid overplotting.

Aesthetic mappings that this grob function understands:

\Itemize{
\item \code{x}:x position (required)
\item \code{y}:y position (required)
\item \code{size}:size of the point, in mm (see \code{\LinkA{scsize}{scsize})}
\item \code{shape}:shape of the glyph used to draw the point (see \code{\LinkA{scshape}{scshape})}
\item \code{colour}:point colour (see \code{\LinkA{sccolour}{sccolour})}
}

These can be specified in the plot defaults (see \code{\LinkA{ggplot}{ggplot}}) or
in the \code{aesthetics} argument.  If you want to modify the position
of the points or any axis options, you will need to add a position scale to
the plot.  These functions start with \code{ps}, eg.
\code{\LinkA{pscontinuous}{pscontinuous}} or \code{\LinkA{pscategorical}{pscategorical}}

Other options:

\Itemize{
\item \code{xjitter}:degree of jitter in x direction, see \code{\LinkA{jitter}{jitter} for details, defaults to 1 if the x variable is a factor, 0 otherwise}
\item \code{yjitter}:degree of jitter in y direction, see \code{\LinkA{jitter}{jitter} for details, defaults to 1 if the y variable is a factor, 0 otherwise}
}
\end{Details}
\begin{Author}\relax
Hadley Wickham <h.wickham@gmail.com>
\end{Author}
\begin{Examples}
\begin{ExampleCode}p <- ggplot(movies, aes=list(x=mpaa, y=rating))
ggjitter(p)
ggjitter(ggboxplot(p))
ggjitter(ggboxplot(p), xjitter=2)
ggjitter(ggboxplot(p), yjitter=1)
p <- ggplot(movies, aes=list(x=mpaa, y=factor(Action)))
ggjitter(p)\end{ExampleCode}
\end{Examples}

