Map component that adds a scale bar.
tm_scalebar(
breaks,
width,
text.size,
text.color,
color.dark,
color.light,
lwd,
position,
bg.color,
bg.alpha,
size = "deprecated",
stack,
frame,
frame.lwd,
frame.r,
margins,
z
)
breaks
width of the scale bar. Units are number of text line heights, which is similar to the number of characters.
text size
text.color
color.dark
color.light
linewidth
An object created with tm_pos_in()
or tm_pos_out()
. Or, as a shortcut, a vector of two values, specifying the x and y coordinates. The first is "left"
, "center"
or "right"
(or upper case, meaning tighter to the map frame), the second "top"
, "center"
or "bottom"
. Numeric values are also supported, where 0, 0 means left bottom and 1, 1 right top. See also vignette about positioning.
Background color
Background transparency
Deprecated (use text.size
instead)
stack with other map components, either "vertical"
or "horizontal"
.
frame
frame line width
Radius of the rounded frame corners. 0 means no rounding.
margins
z