AddNorthArrow: Plot north arrow

AddNorthArrowR Documentation

Plot north arrow

Description

Plot a north arrow (pointing directly "up" and with label "N") positioned based on current plot extents.

Usage

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
)

Arguments

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 par("cex") or by setting par("mfrow") or par("mfcol").

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.

Author(s)

Dewey Dunnington, Thomas Münch

Source

Adapted from <https://CRAN.R-project.org/package=prettymapr>

Examples


plot(1 : 5, 1 : 5, asp = 1)
AddNorthArrow()


EarthSystemDiagnostics/grfxtools documentation built on Aug. 5, 2023, 1:43 p.m.