| 1 |
\name{mapasp} |
| 2 |
\alias{mapasp} |
| 3 |
\alias{degreeLabelsEW} |
| 4 |
\alias{degreeLabelsNS} |
| 5 |
|
| 6 |
\title{ Calculate aspect ratio for plotting geographic maps; |
| 7 |
create nice degree axis labels } |
| 8 |
\description{ Calculate aspect ratio for plotting geographic maps; |
| 9 |
create nice degree axis labels } |
| 10 |
\usage{ |
| 11 |
mapasp(data, xlim, ylim) |
| 12 |
degreeLabelsEW(x) |
| 13 |
degreeLabelsNS(x) |
| 14 |
} |
| 15 |
\arguments{ |
| 16 |
\item{data}{ object of class or extending \code{Spatial}} |
| 17 |
\item{xlim}{ the xlim argument passed (or derived from bounding box) } |
| 18 |
\item{ylim}{ the ylim argument passed (or derived from bounding box) } |
| 19 |
\item{x}{ numeric; values at which tics and marks will be generated } |
| 20 |
} |
| 21 |
\value{ |
| 22 |
\code{mapasp} is used for the aspect argument in lattice plots and spplot; |
| 23 |
|
| 24 |
let x = dy/dx, with dy and dx the y- and x-size of the map. |
| 25 |
|
| 26 |
let s = 1/cos((My * pi)/180) with My the y coordinate of the middle of the map |
| 27 |
(the mean of ylim) |
| 28 |
|
| 29 |
for latlong (longlat) data, \code{mapasp} returns s * x. |
| 30 |
for other data, mapasp returns "iso". |
| 31 |
} |
| 32 |
\note{the values for \code{x} are typically obtained from \link{axTicks}} |
| 33 |
\seealso{ \link[lattice]{levelplot} in package \code{lattice}} |
| 34 |
|
| 35 |
\keyword{dplot} |