File: mapasp.Rd

package info (click to toggle)
r-cran-sp 1%3A2.2-0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,856 kB
  • sloc: ansic: 1,091; sh: 14; makefile: 2
file content (35 lines) | stat: -rw-r--r-- 1,128 bytes parent folder | download
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
27
28
29
30
31
32
33
34
35
\name{mapasp}
\alias{mapasp}
\alias{degreeLabelsEW}
\alias{degreeLabelsNS}

\title{ Calculate aspect ratio for plotting geographic maps;
create nice degree axis labels }
\description{ Calculate aspect ratio for plotting geographic maps;
create nice degree axis labels }
\usage{ 
mapasp(data, xlim, ylim)
degreeLabelsEW(x)
degreeLabelsNS(x)
}
\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) }
\item{x}{ numeric; values at which tics and marks will be generated }
}
\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".
}
\note{the values for \code{x} are typically obtained from \link{axTicks}}
\seealso{ \link[lattice]{levelplot} in package \code{lattice}}

\keyword{dplot}