This function was renamed to tm_scalebar() in tmap v4.0.
Arguments
- ...
Arguments passed on to
tm_scalebarbreaksbreaks. E.g.
c(0, 10, 50)places scale bar breaks at 0, 10, and 50 units. These units are specified intm_shape().widthwidth of the scale bar. Units are number of text line heights, which is similar to the number of characters. In case
beaksare specified, thewidthis only handy to finetune the approximated width, e.g. in case clipping of the labels occurs, or there is too much whitespace.allow_clippingshould clipping of the last label by allowed? If
TRUE(default), the last break label including unit is printed even when it doesn't fit the frame. IfFALSEit will not be printed. Instead the unit suffix is added to the second last label.text.sizetext size
text.colortext.color
color.darkcolor.dark
color.lightcolor.light
lwdlinewidth
sizeDeprecated (use
text.sizeinstead)stackstack with other map components, either
"vertical"or"horizontal".marginsmargins
frameframe should a frame be drawn?
frame.colorframe color
frame.alphaframe alpha transparancy
frame.lwdframe line width
frame.rRadius of the rounded frame corners. 0 means no rounding.
bgShow background?
bg.colorBackground color
bg.alphaBackground transparency
positionThe position specification of the component: an object created with
tm_pos_in()ortm_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. In case multiple components should be combined (stacked), usegroup_idand specifycomponentintm_components().group_idComponent group id name. All components (e.g. legends, titles, etc) with the same
group_idwill be grouped. The specifications of how they are placed (e.g. stacking, margins etc.) are determined intm_components()where its argumentidshould correspond togroup_id.zz index, e.g. the place of the component relative to the other componets
