\HeaderA{dataViewport}{Create a Viewport with Scales based on Data}{dataViewport}
\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.  If length greater than 1, then
first value is used to extend the xscale and second value
is used to extend the yscale.

\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{\LinkA{viewport}{viewport}} and
\code{\LinkA{plotViewport}{plotViewport}}.
\end{SeeAlso}

