\Header{dataViewport}{Create a Viewport with Scales based on Data}
\keyword{dplot}{dataViewport}
\begin{Description}\relax
This is a convenience function for producing a viewport with
x- and/or y-scales based on numeric values passed to the function.
\end{Description}
\begin{Usage}
\begin{verbatim}
dataViewport(xData = NULL, yData = NULL, xscale = NULL, yscale = NULL,
             extension = 0.05, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{xData}] A numeric vector of data. 
\item[\code{yData}] A numeric vector of data. 
\item[\code{xscale}] A numeric vector (length 2). 
\item[\code{yscale}] A numeric vector (length 2). 
\item[\code{extension}] A numeric. 
\item[\code{...}] All other arguments will be passed to a call to
the \code{viewport()} function. 
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
If \code{xscale} is not specified then the values in \code{x} are
used to generate an x-scale based on the range of \code{x}, extended
by the proportion specified in \code{extension}.  Similarly for the
y-scale.
\end{Details}
\begin{Value}
A grid viewport object.
\end{Value}
\begin{Author}\relax
Paul Murrell
\end{Author}
\begin{SeeAlso}\relax
\code{\Link{viewport}} and
\code{\Link{plotViewport}}.
\end{SeeAlso}

