Plot a scale bar.

mf_scale(size, pos = "bottomright", lwd = 1.5, cex = 0.6, col, unit = "km")

Arguments

size

size of the scale bar in units (default to km). If size is not set, an automatic size is used (1/10 of the map width)

pos

position. It can be one of 'bottomright', 'bottomleft', 'interactive' or a vector of two coordinates in map units (c(x, y)).

lwd

width of the scale bar

cex

cex of the text

col

color

unit

units used for the scale bar. Can be "mi" for miles, "m" for meters, or "km" for kilometers (default)

Value

No return value, a scale bar is displayed.

Note

This scale bar does not work on unprojected (long/lat) maps.

Examples

mtq <- mf_get_mtq()
mf_map(mtq)
mf_scale()