\HeaderA{tmd}{Tukey Mean-Difference Plot}{tmd}
\keyword{dplot}{tmd}
\begin{Description}\relax
Create Tukey Mean-Difference Plots from a trellis object returned by
\code{xyplot} and \code{qq}
\end{Description}
\begin{Usage}
\begin{verbatim}
tmd(object,
    xlab = "mean",
    ylab = "difference",
    panel = "panel.tmd",
    prepanel = "prepanel.default.tmd",
    ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{object}] An object of class ``trellis'' returned by
\code{xyplot} or \code{qq}

\item[\code{xlab}] x label
\item[\code{ylab}] y label
\item[\code{panel}] panel function to be used 
\item[\code{prepanel}] prepanel function used to recalculate limits using the modified
\code{x} and \code{y} values

\item[\code{...}] other arguments
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The Tukey Mean-difference plot is produced by modifying the (x,y)
values of each panel as follows: the new coordinates are given by
\code{x=(x+y)/2} and \code{y=y-x}.

\code{tmd} uses the \code{update} method for ``trellis'' objects,
which processes all extra arguments supplied to \code{tmd}.
\end{Details}
\begin{Value}
An object of class ``trellis''. The `update' method can be used to
update components of the object and the `print' method (usually called
by default) will plot it on an appropriate plotting device.
\end{Value}
\begin{Author}\relax
Deepayan Sarkar \email{Deepayan.Sarkar@R-project.org}
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{panel.tmd}{panel.tmd}}, \code{\LinkA{xyplot}{xyplot}},
\code{\LinkA{Lattice}{Lattice}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
tmd(qqmath(~height|voice.part, data = singer))
\end{ExampleCode}
\end{Examples}

