crs: A character string from which a projection can be extracted with terra::crs
pos: Position, as specified in the legend function.
cex: scaling factor for the legend
pt.cex: Scaling factor north arrow (can be zero).
seg.len: approximate length (in character units) of the scale bar. can be zero.
title.cex: scaling for the distance text
outer: If TRUE, put bar or map in the margin of the plot
map: Either a Raster for the inset map or a string passed to openmap's path argument
zoom: Zoom level if retrieving inset map from openmap
width: Width of the inset map, as a fraction of the plot window
col: Colour for shaded region of inset map
borderMap: border style for the inset map (passed to polygon)
cropInset: Crop the insert map to this extent
inset: how far from the border to put the inset map
...: Additional arguments passed to legend for scaleBar
or polygon (for insetMap).
Details
scaleBar produces a scale bar reflecting the distance travelling on a great circle from the centre of the plot and travelling to the right. The length of the bar is the width of 6 characters times scale.cex.
Returns
A list containig coordinates of the elements of the scale bar.