\Header{plot.window}{Set up World Coordinates for Graphics Window}
\keyword{aplot}{plot.window}
\begin{Usage}
\begin{verbatim}
plot.window(xlim, ylim, log = "", asp = NA, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\texttt{xlim, ylim}] numeric of length 2, giving the x and y coordinates ranges.
\item[\texttt{log}] character; indicating which axes should be in log scale.
\item[\texttt{asp}] numeric, giving the \bold{asp}ect ratio y/x.
\item[\texttt{...}] further graphical parameters as in \texttt{\Link{par}(..)}.
\end{ldescription}
\end{Arguments}
\begin{Description}
This function sets up the world coordinate system for a graphics
window.  It is called by higher level functions such as
\texttt{\Link{plot.default}} (\emph{after} \texttt{\Link{plot.new}}).\end{Description}
\begin{Details}
Note that if \texttt{asp} is a finite positive value then
the window is set up so that one data unit in the x direction
is equal in length to \texttt{asp} \eqn{\times}{*} one data unit in the
y direction.

The special case \texttt{asp == 1} produces plots where distances
between points are represented accurately on screen.  Values
with \texttt{asp > 1} can be used to produce more accurate maps when
using latitude and longitude.

Usually, one should rather use the higher level functions such as
\texttt{\Link{plot}}, \texttt{\Link{hist}}, \texttt{\Link{image}}, \dots,
instead and refer to their help pages for explanation of the arguments.\end{Details}
\begin{SeeAlso}
\texttt{\Link{xy.coords}}, \texttt{\Link{plot.xy}}, \texttt{\Link{plot.default}}.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
##--- An example for the use of  `asp' :
library(mva)
data(eurodist)
loc <- cmdscale(eurodist)
rx <- range(x <- loc[,1])
ry <- range(y <- -loc[,2])
plot(x, y, type="n", asp=1, xlab="", ylab="")
abline(h=pretty(rx, 10),
       v=pretty(ry, 10), col= "lightgray")
text(x, y, names(eurodist), cex=0.5)
\end{ExampleCode}
\end{Examples}

