Description Usage Arguments Value Author(s) See Also Examples
View source: R/AddNorthArrow.R
Add a north arrow aligned to true north to a plot.
1 | AddNorthArrow(crs = sp::CRS(), len = 0.05, lab = "N", rotate = 0, ...)
|
crs |
'CRS', 'Raster*', or 'Spatial'.
Coordinate reference system (CRS), or any object with a CRS attribute
that can be extracted using the |
len |
'numeric' number. Arrow length expressed as a fraction of the plot height, by default is 5-percent. |
lab |
'character' string. North label, by default is “N”. |
rotate |
'numeric' number. Arrow offset-rotation in degrees, where positive values are taken to be clockwise. |
... |
Additional arguments to be passed to the |
Invisible NULL
J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center
1 2 3 4 5 6 7 8 9 10 11 | m <- datasets::volcano
m <- m[nrow(m):1, ncol(m):1]
x <- seq(from = 2667405, length.out = ncol(m), by = 10)
y <- seq(from = 6478705, length.out = nrow(m), by = 10)
r <- raster::raster(m, xmn = min(x), xmx = max(x),
ymn = min(y), ymx = max(y),
crs = "+init=epsg:27200")
PlotMap(r, pal = GetColors(scheme = "DEM screen"))
AddNorthArrow(raster::crs(r), loc = "center")
AddNorthArrow(raster::crs(r), inset = 0.1)
AddNorthArrow(raster::crs(r), loc = "topleft", inset = 0.1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.