View source: R/gridlinesWrap.R
gridlinesWrap | R Documentation |
long-lat grid lines are added to a map in the coordinate system specified, allowing for map projections wrapped differently from the 180 meridian.
gridlinesWrap(crs,
easts=seq(-180,180,by=60),
norths=seq(-90,90,by=30),
ndiscr=40, plotLines=TRUE,
plotLabels = TRUE, ...)
crs |
A character string representing a CRS |
easts |
vector of longitudes |
norths |
vector of latitudes |
ndiscr |
number of intermediate points per line |
plotLines |
add lines to existing plot |
plotLabels |
add labels to existing plot |
... |
Additional arguments passed to |
A list with elements lines
, containg the graticule lines, and points
containing the locations and labels for longitude and latitude values.
Patrick Brown
graticule
data('worldMap')
worldMap = terra::unwrap(worldMap)
crsMoll = moll(-100)
worldMapT = wrapPoly(worldMap, crsMoll, buffer.width=200*1000)
plot(attributes(crsMoll)$ellipse)
plot(worldMapT, add=TRUE)
gridlinesWrap(crsMoll, lty=3, col='red', cex=0.6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.