Skip to contents

Map component that adds a title

Usage

tm_title(
  text,
  size,
  color,
  padding,
  fontface,
  fontfamily,
  alpha,
  stack,
  just,
  frame,
  frame.lwd,
  frame.r,
  bg.color,
  bg.alpha,
  position,
  width,
  height,
  group.frame,
  resize_as_group,
  z
)

tm_title_in(text, ..., position = tm_pos_in("left", "top"))

tm_title_out(text, ..., position = tm_pos_out("center", "top"))

Arguments

text

text

size

font size

color

font color

padding

padding

fontface

font face, bold, italic

fontfamily

font family

alpha

alpha transparency of the text

stack

stack with other map components, either "vertical" or "horizontal".

just

just

frame

frame

frame.lwd

frame line width

frame.r

Radius of the rounded frame corners. 0 means no rounding.

bg.color

Background color

bg.alpha

Background transparency

position

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.

width, height

width and height of the component.

group.frame

put frame around all components that are drawn on the same location. Whether a frame is drawn is still decided by the frame argument of the 'main' (first) component.

resize_as_group

in case a component if rescaled because of the limited space, rescale the other components proportionally?

z

z index, e.g. the place of the component relative to the other componets

...

passed on to tm_title()