mapElements: Addition of both a north arrow and scalebar to map

Description Usage Arguments Value

View source: R/mapcomponents.R

Description

This is a helper function to add both north arrow and scalebar to a map.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
mapElements(
  x,
  y,
  scalesize,
  scalelabel,
  cex.label = 0.75,
  font.label = 1,
  col.label = "black",
  type.north = "simple",
  lwd.north = 0.5,
  offset.north = height.scale * 1.5,
  r.north = scalesize/5,
  bkgrd.north = "white",
  fill.north = "black",
  offset.scale = height.scale,
  height.scale = scalesize/8,
  border.scale = "black",
  col.scale = "white",
  lwd.scale = 0.5
)

Arguments

x

x coordinate for the centre of the added elements (the centre of the text label)

y

y coordinate for the centre of the added elements (the centre of the text label)

scalesize

width of the scalebar in map units (this function assumes projcted units but will not throw a warning if unprojected units are used.

scalelabel

text label for the state width of the scalebar (it requires the user to enter this and is not automatically generated from scalesize)

Value

a plotted north arrow and scale-bar


ahb108/sparch documentation built on Feb. 3, 2021, 1:21 a.m.