map.new: Start a new map

View source: R/map.new.R

map.newR Documentation

Start a new map

Description

Prepare a plotting window suitable for a map

Usage

map.new(x,legendRight=FALSE, buffer=0, mar=c(0,0,0,0), ...)

Arguments

x

A spatial object from which an extent can be extracted.

legendRight

Leave room to the right for the legend produced by plotting a Raster object

buffer

passed to extend to increase the plotting area

mar

see par

...

Additional arguments passed to plot

Details

map.new initiates a plot intended to contain a map covering the extent of x, with no margins.

Value

A list of the graphical parameters prior to calling map.new

Author(s)

Patrick Brown

Examples


nldTiles = terra::unwrap(nldTiles)
nldCities = terra::unwrap(nldCities)


oldpar = map.new(nldCities)
plot(nldTiles, add=TRUE)
points(nldCities)
par(oldpar)


mapmisc documentation built on Nov. 21, 2023, 5:09 p.m.