tmap-element

0th

Percentile

tmap element

Building block for drawing thematic maps. All element functions have the prefix tm_.

Details

The fundamental, and hence required element is tm_shape, which specifies the shape object, and also specifies the projection and bounding box.

The elements that serve as aesthetics layers are

Base layers:

tm_polygons Create a polygon layer (with borders)
tm_symbols Create a layer of symbols
tm_lines Create a layer of lines
tm_raster Create a raster layer
tm_text Create a layer of text labels
tm_basemap Create a layer of basemap tiles
tm_tiles Create a layer of overlay tiles

Derived layers:

tm_fill Create a polygon layer (without borders)
tm_borders Create polygon borders
tm_bubbles Create a layer of bubbles
tm_squares Create a layer of squares
tm_dots Create a layer of dots
tm_markers Create a layer of markers
tm_iso Create a iso/contour lines
tm_rgb Create a raster layer of an image

The layers can be stacked by simply adding them with the + symbol. The combination of the elements described above form one group. Multiple groups can be stacked. Each group should start with tm_shape.

Attributes layers:

tm_grid Create grid lines
tm_scale_bar Create a scale bar
tm_compass Create a map compass
tm_credits Create a text for credits
tm_logo Create a logo
tm_xlab and tm_ylab Create axis labels
tm_minimap Create a minimap (view mode only)

The element tm_facets specifies facets (small multiples). The element tm_layout is used to change the layout of the map.

References

Tennekes, M., 2018, tmap: Thematic Maps in R, Journal of Statistical Software, 84(6), 1-39, DOI

See Also

vignette("tmap-getstarted")

The examples in each of the element functions

Aliases
  • tmap-element
Documentation reproduced from package tmap, version 2.0, License: GPL-3

Community examples

Looks like there are no examples yet.