\HeaderA{legends}{Legends}{legends}
\keyword{hplot}{legends}
\keyword{internal}{legends}
\begin{Description}\relax
Create and arrange legends for all scales.
\end{Description}
\begin{Usage}
\begin{verbatim}legends(scales, horizontal = FALSE)\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{scales}] scales object
\item[\code{horizontal}] direction of scales, vertical by default
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
This function gathers together all of the legends produced by
the scales that make up the plot and organises them into a
\code{\LinkA{frameGrob}{frameGrob}}.

If there are no legends to create, this function will return \code{NULL}
\end{Details}
\begin{Value}
frameGrob, or NULL if no legends
\end{Value}
\begin{Author}\relax
Hadley Wickham <h.wickham@gmail.com>
\end{Author}
\begin{Examples}
\begin{ExampleCode}\end{ExampleCode}
\end{Examples}

