Plot a scale bar.
barscale( size, lwd = 1.5, cex = 0.6, pos = "bottomright", style = "pretty", unit = "km" )
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). |
---|---|
lwd | width of the scale bar. |
cex | cex of the text. |
pos | position of the legend, default to "bottomright". "bottomright" or a vector of two coordinates (c(x, y)) are possible. |
style | style of the legend, either "pretty" or "oldschool". The "oldschool" style only uses the "size" parameter. |
unit | units used for the scale bar. Can be "mi" for miles, "m" for meters, or "km" for kilometers (default) |
This scale bar is not accurate on unprojected (long/lat) maps.
#>#> Reading layer `mtq' from data source #> `/tmp/RtmppBiN3A/temp_libpath43d97684eada/cartography/gpkg/mtq.gpkg' #> using driver `GPKG' #> Simple feature collection with 34 features and 7 fields #> Geometry type: MULTIPOLYGON #> Dimension: XY #> Bounding box: xmin: 690574 ymin: 1592536 xmax: 735940.2 ymax: 1645660 #> Projected CRS: WGS 84 / UTM zone 20Nbarscale(size = 5)