File: mapasp.Rd

package info (click to toggle)
r-cran-sp 1:0.9-66-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,696 kB
  • ctags: 123
  • sloc: ansic: 1,475; sh: 6; makefile: 5
file content (26 lines) | stat: -rw-r--r-- 828 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
\name{mapasp}
\alias{mapasp}
\title{ Calculate aspect ratio for plotting geographic maps }
\description{ Calculate aspect ratio for plotting geographic maps }
\usage{ 
mapasp(data, xlim, ylim)
}
\arguments{
\item{data}{ object of class or extending \code{Spatial}}
\item{xlim}{ the xlim argument passed (or derived from bounding box) }
\item{ylim}{ the ylim argument passed (or derived from bounding box) }
}
\value{
	\code{mapasp} is used for the aspect argument in lattice plots and spplot; 

	let x = dy/dx, with dy and dx the y- and x-size of the map.

	let s = 1/cos((My * pi)/180) with My the y coordinate of the middle of the map
	(the mean of ylim)

	for latlong (longlat) data, \code{mapasp} returns s * x.
	for other data, mapasp returns "iso".
}
\seealso{ \link{levelplot} in package \code{lattice}}

\keyword{dplot}