\Header{grid.collection}{Create a Coherent Group of Grid Graphical Objects}
\keyword{dplot}{grid.collection}
\begin{Description}\relax
This function creates a graphical object which contains
several other graphical objects.  When it is drawn, it draws
all of its children.  

It may be convenient to name the elements of the collection.\end{Description}
\begin{Usage}
\begin{verbatim}
grid.collection(..., gp=gpar(), draw=TRUE, vp=NULL)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{...}] Zero or more objects of class \code{"grob"}.
\item[\code{gp}] An object of class \code{gpar}, typically the output
from a call to the function \code{gpar}.  This is basically
a list of graphical parameter settings.
\item[\code{draw}] A logical value to indicate whether to produce
graphical output.
\item[\code{vp}] A Grid viewport object (or NULL).
\end{ldescription}
\end{Arguments}
\begin{Value}
An object of class \code{"grob"} containing a list structure
of class \code{"collection"}.\end{Value}
\begin{Author}\relax
Paul Murrell\end{Author}
\begin{SeeAlso}\relax
\code{\Link{grid.grob}}.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
grid.newpage()
lc <- grid.collection(l1=grid.lines(draw=FALSE),
                      l2=grid.lines(c(.5, .5), draw=FALSE))
grid.edit(lc, gp=gpar(col="blue"))
grid.edit(lc, "children", "l2", gp=gpar(col="red"))
\end{ExampleCode}
\end{Examples}

