Rev 42333 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
% File src/library/grid/man/dataViewport.Rd% Part of the R package, http://www.R-project.org% Copyright 1995-2007 R Core Development Team% Distributed under GPL 2 or later\name{dataViewport}\alias{dataViewport}\title{ Create a Viewport with Scales based on Data }\description{This is a convenience function for producing a viewport withx- and/or y-scales based on numeric values passed to the function.}\usage{dataViewport(xData = NULL, yData = NULL, xscale = NULL,yscale = NULL, extension = 0.05, ...)}\arguments{\item{xData}{ A numeric vector of data. }\item{yData}{ A numeric vector of data. }\item{xscale}{ A numeric vector (length 2). }\item{yscale}{ A numeric vector (length 2). }\item{extension}{ A numeric. If length greater than 1, thenfirst value is used to extend the xscale and second valueis used to extend the yscale.}\item{\dots}{ All other arguments will be passed to a call tothe \code{viewport()} function. }}\details{If \code{xscale} is not specified then the values in \code{x} areused to generate an x-scale based on the range of \code{x}, extendedby the proportion specified in \code{extension}. Similarly for they-scale.}\value{A grid viewport object.}\author{ Paul Murrell }\seealso{\code{\link{viewport}} and\code{\link{plotViewport}}.}\keyword{dplot}