This function maps World countries in the Robinson projection system (by default) and centers the map on a meridian different from Greenwich. It uses the Natural Earth layer as a base map. All components of the map can be customized (color, line type, etc.).
a character of length 1. One among 'small'
, 'medium'
,
'large'
. See ?rnaturalearth::ne_countries
for further details.
a character of length 1. The Coordinate Reference System (CRS) of
the map. See ?sp::CRS
for further details.
N.B. the CRS must contain a parameter +lon_0=0
in its definition.
a numeric of length 1. The longitude of center of the map. Must be higher or equal to 0 and lower than 359.
a numeric vector. The longitudes to add meridians.
a numeric vector. The latitudes to add parallels.
the color of countries border.
the color of map frame.
the color of countries.
the color of map frame (i.e. oceans).
the color of graticules.
the lines width of countries border.
the lines width of map frame.
the lines width of graticules.
the line type of countries border.
the line type of map frame.
the line type of graticules.
other graphical parameters. See ?par
.
The world layer as an sf
object.
if (FALSE) {
## Robinson World map centered on Greenwich ----
robinmap()
## Robinson World map centered on Pacific ocean ----
robinmap(center = 160)
## Change projection system ----
crs <- paste0("+proj=eck4 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 ",
"+datum=WGS84 +units=m +no_defs")
robinmap(center = 160, crs = crs)
}