Skip to contents

Add a bar to a map

Usage

add_bar(bar_d = NULL, bar_xy = NULL, bar_adj = NULL, bar_lon = 0.4788987, ...)

Arguments

bar_d

integer, size of the bar in km.

bar_xy

either a character or a vector giving the position of the bar in the plot.

bar_adj

numeric of length 2, adjustment for text placement.

bar_lon

numeric of length 1, may be adjusted for some plots with trial-and-error strategy.

...

some unused parameters.

Value

NULL.

Details

Correct some things in sbar from terra to add scale bar to plots.

Author

Frédéric Grelot

Examples


if (FALSE) { # \dontrun{
library(sf)
plot(so_ii_collectivity[0])
add_bar(bar_d = 10, bar_xy = c(3.55, 43.47), bar_adj = c(0.5, -1))
} # }