Plot a scale bar.
barscale(size = NULL, lwd = 1.5, cex = 0.6, pos = NULL,
style = "pretty")
Arguments
- size
- size of the scale bar in kilometers. If set to NULL, an
automatic scale bar is displayed (1/10 of the map width).
- lwd
- width of the scale bar.
- cex
- cex of the text.
- pos
- position of the legend, default to the bottom right corner of the map.
A vector of two coordinates (c(x, y) is possible.
- style
- style of the legend, either "pretty" or "oldschool". The
"oldschool" style only uses the "size" parameter.
See also
layoutLayer
Examples
data("nuts2006")
plot(nuts0.spdf, col = "grey60",border = "grey20", add=FALSE)
barscale(size = 1000)
barscale(size = 500, lwd = 3, cex = .9, pos = c(3553000, 1449000))

plot(nuts0.spdf, col = "grey60",border = "grey20", add=FALSE)
barscale(style = "oldschool")
