basemap: Draw a (blank) map

View source: R/basemap.R

basemapR Documentation

Draw a (blank) map

Description

A blank map is created that has approximatedly the correct aspect ratio for its latitude.

Usage

basemap(xlim, ylim, xlab = "Longitude", ylab = "Latitude", bg = "lightblue", ...)

Arguments

xlim

the x limits (x1, x2) of the plot.

ylim

the y limits of the plot.

xlab

a label for the x axis, defaults to "Longitude".

ylab

a label for the y axis, defaults to "Latitude".

bg

background colour for the map, defaults to "lightblue".

...

other arguments to be passed to plot.default.

Details

The aspect ratio of the map is based on the approximation that the earth is a perfect sphere of 21600 nautical miles in circumference. The straight-line distance between two medidians that lie 1 degree apart is then 60 nautical miles ⁠*⁠ cos(latitude). The aspect ratio is therefore set at the inverse of the cosine of the latitude at the middle of the y-scale. If the plot window is re-sized the aspect ratio will remain correct but the background colour will not fill the full plot area.

Author(s)

Hans Gerritsen

Examples

data(landings)
data(coast)
xlim <- c(-11,-5.5)
ylim <- c(51.5,55.5)
basemap(xlim, ylim)
draw.shape(coast, col="cornsilk")

mapplots documentation built on Aug. 25, 2023, 5:15 p.m.