AddNorthArrow | R Documentation |
Plot a north arrow (pointing directly "up" and with label "N") positioned based on current plot extents.
AddNorthArrow(
pos = "topright",
padin = c(0.15, 0.15),
scale = 1,
lwd = 1,
border = "black",
cols = c("white", "black"),
col.text = "black",
cex.text = 1,
vadj.text = 0.5
)
pos |
where to align the north arrow. One of "bottomleft", "bottomright", "topleft", or "topright". |
padin |
a vector of length 2 determining the distance in inches between the scalebar and the edge of the plottable area. |
scale |
scale the north arrow to make it bigger or smaller. |
lwd |
the line width outlining the north arrow. |
border |
the line color outlining the north arrow. |
cols |
a vector of length 2 determining the two colors to be drawn for the north arrow. |
col.text |
color of the text label. |
cex.text |
character expansion factor for the text label. This is an
absolute measure, not scaled by |
vadj.text |
value in [0, 1] to specify the vertical adjustment of the text label relative to the north arrow, with 0 for top, 1 for bottom, and 0.5 for centered position. On most devices values outside [0, 1] will also work. |
Dewey Dunnington, Thomas Münch
Adapted from <https://CRAN.R-project.org/package=prettymapr>
plot(1 : 5, 1 : 5, asp = 1)
AddNorthArrow()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.