\HeaderA{grid.set}{Set a Grid Graphical Object}{grid.set}
\aliasA{setGrob}{grid.set}{setGrob}
\keyword{dplot}{grid.set}
\begin{Description}\relax
Replace a grob or a descendant of a grob.
\end{Description}
\begin{Usage}
\begin{verbatim}
grid.set(gPath, newGrob, strict = FALSE, grep = FALSE,
         redraw = TRUE)
 
setGrob(gTree, gPath, newGrob, strict = FALSE, grep = FALSE) 
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{gTree}] A gTree object.
\item[\code{gPath}] A gPath object. For \code{grid.set} this
specifies a grob on the display list.  For \code{setGrob} this
specifies a descendant of the specified gTree. 
\item[\code{newGrob}] A grob object. 
\item[\code{strict}] A boolean indicating whether the gPath must be
matched exactly. 
\item[\code{grep}] A boolean indicating whether the \code{gPath} should
be treated as a regular expression.  Values are recycled across
elements of the \code{gPath} (e.g., \code{c(TRUE, FALSE)} means
that every odd element of the \code{gPath} will be treated as
a regular expression).

\item[\code{redraw}] A logical value to indicate whether to redraw the grob. 
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
\code{setGrob} copies the specified grob and returns a modified
grob.

\code{grid.set} destructively replaces a grob on the display list.
If \code{redraw}
is \code{TRUE} it then redraws everything to reflect the change.

These functions should not normally be called by the user.
\end{Details}
\begin{Value}
\code{setGrob} returns a grob object;  \code{grid.set} returns \code{NULL}.
\end{Value}
\begin{Author}\relax
Paul Murrell
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{grid.grob}{grid.grob}}.
\end{SeeAlso}

