\HeaderA{ggarea}{Grob function: area}{ggarea}
\keyword{hplot}{ggarea}
\keyword{internal}{ggarea}
\begin{Description}\relax
Add an filled area to a plot.
\end{Description}
\begin{Usage}
\begin{verbatim}ggarea(plot = .PLOT, aesthetics=list(), ..., data=NULL)\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{plot}] x positions
\item[\code{aesthetics}] y positions
\item[\code{...}] id variable used to separate observations into different areas
\item[\code{data}] colour
\item[\code{}] pattern
\item[\code{}] ...
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Aesthetic mappings that this grob function understands:

\Itemize{
\item \code{x}:x position (required)
\item \code{y}:y position (required)
\item \code{id}:identifier variable used to break up into multiple paths
\item \code{colour}:line colour (see \code{\LinkA{sccolour}{sccolour}})
\item \code{fill}:fill colour (see \code{\LinkA{sccolour}{sccolour}})
\item \code{linetype}:line style/type (see \code{\LinkA{sclinetype}{sclinetype}})
}

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 none
}
\end{Details}
\begin{Author}\relax
Hadley Wickham <h.wickham@gmail.com>
\end{Author}
\begin{Examples}
\begin{ExampleCode}huron <- data.frame(year = 1875:1972, level = as.vector(LakeHuron))
p <- ggplot(huron, aes=list(y=level, x=year))
ggarea(p)
ggarea(p, colour="black")
ggline(ggarea(p)) # better
qplot(year, level, data=huron, type=c("area", "line"))
ggarea(p, fill=alpha("grey80", 0.5))
pscontinuous(ggarea(p), "y", range=c(0,NA))\end{ExampleCode}
\end{Examples}

