tmap (version 3.3-3)

tmap-element: tmap element

Description

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

Arguments

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_polygonsCreate a polygon layer (with borders)
tm_symbolsCreate a layer of symbols
tm_linesCreate a layer of lines
tm_rasterCreate a raster layer
tm_textCreate a layer of text labels
tm_basemapCreate a layer of basemap tiles
tm_tilesCreate a layer of overlay tiles

Derived layers:

tm_fillCreate a polygon layer (without borders)
tm_bordersCreate polygon borders
tm_bubblesCreate a layer of bubbles
tm_squaresCreate a layer of squares
tm_dotsCreate a layer of dots
tm_markersCreate a layer of markers
tm_isoCreate a layer of iso/contour lines
tm_rgbCreate 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_gridCreate grid lines
tm_scale_barCreate a scale bar
tm_compassCreate a map compass
tm_creditsCreate a text for credits
tm_logoCreate a logo
tm_xlab and tm_ylabCreate axis labels
tm_minimapCreate a minimap (view mode only)

Layout element:

tm_layoutAdjust the layout (main function)
tm_legendAdjust the legend
tm_viewConfigure the interactive view mode
tm_styleApply a predefined style
tm_formatApply a predefined format
------------------------------------------------------------------------------------------------------------------------------

References

Tennekes, M., 2018, tmap: Thematic Maps in R, Journal of Statistical Software, 84(6), 1-39, tools:::Rd_expr_doi("10.18637/jss.v084.i06")

See Also

vignette("tmap-getstarted")

The examples in each of the element functions