Skip to contents

Thematic Maps

tmap tmap-package
Thematic Map Visualization
`+`(<tmap>)
Stacking of tmap elements

Create a quick plot

qtm()
Quick thematic map plot

Specify spatial data

tm_shape()
Shape (spatial object) specification
tm_crs()
Set the map projection (CRS)

Add data-driven map layers

tm_polygons() tm_fill() tm_borders() opt_tm_polygons()
Map layer: polygons
tm_lines() opt_tm_lines()
Map layer: lines
tm_symbols() tm_dots() tm_bubbles() tm_squares() tm_markers() opt_tm_markers() opt_tm_symbols() opt_tm_dots() opt_tm_bubbles() opt_tm_squares()
Map layer: symbols
tm_circles() opt_tm_circles()
Map layer: geographic circles
tm_raster() opt_tm_raster()
Map layer: raster
tm_rgb() tm_rgba() opt_tm_rgb()
Map layer: RGB images
tm_text() tm_labels() tm_labels_highlighted() opt_tm_text() opt_tm_labels()
Map layer: text
tm_placement()
Label placement: how labels find a spot
tm_leader()
Leader lines of labels
tm_iso()
Map layer: iso (contour)
tm_sf() opt_tm_sf()
Map layer: simple features

Specify facets and animations

Add auxiliary map layers

tm_basemap() tm_tiles()
Map layer: basemap / overlay tiles
tm_graticules() tm_grid()
Coordinate grid / graticule lines

Add map components

tm_title() tm_title_in() tm_title_out()
Map component: title
tm_credits()
Map component: credits
tm_compass()
Map component: compass
tm_scalebar()
Map component: scale bar
tm_logo()
Map component: logo
tm_minimap()
Map component: minimap
tm_mouse_coordinates()
Map component: mouse coordinates
tm_xlab() tm_ylab()
Map component: axis labels
tm_inset()
Map component: inset map

Set scale for a map variable

Always use those in this form <map_variable>.scale = tm_scale*()

tm_scale()
Scales: automatic scale
tm_scale_asis()
Scales: as is
tm_scale_bivariate()
Scales: bivariate scale
tm_scale_ordinal() tm_scale_categorical()
Scales: categorical and ordinal scale
tm_scale_continuous() tm_scale_continuous_log() tm_scale_continuous_log2() tm_scale_continuous_log10() tm_scale_continuous_log1p() tm_scale_continuous_sqrt() tm_scale_continuous_pseudo_log()
Scales: continuous scale
tm_scale_continuous_area() tm_scale_continuous_volume()
Scales: continuous scales proportional to area or volume
tm_scale_discrete()
Scales: discrete scale
tm_scale_intervals()
Scales: interval scale
tm_scale_rank()
Scales: rank scale
tm_scale_rgb() tm_scale_rgba()
Scales: RGB

Set legend for a map variable

Always use those in this form <map_variable>.legend = tm_legend*()

Set charts for a map variable

Always use those in this form <map_variable>.chart = tm_chart*()

Position components

Per-map options

tm_style() tm_layout()
Per-map layout options
tm_options()
Per-map tmap options
tm_view()
View mode options
tm_group()
Layer group control
tm_plot()
Plot mode options
tm_check_fix()
Check and fix invalid geometries

Global options

Modes

tmap_mode() ttm() rtm() tmap_mode_pool() ttmp() rtmp()
Get or set tmap mode
tmap_devel_mode()
Toggle developer diagnostics
tmap_design_mode()
Toggle design overlay

Display and arrange

tmap_last()
Retrieve the last map to be modified or created
print(<tmap>) knit_print(<tmap>)
Display thematic map
tmap_arrange() knit_print(<tmap_arrange>) print(<tmap_arrange>)
Arrange small multiples in grid layout
renderTmap() tmapOutput() tmapProxy() tm_remove_layer() renderTmapGS() tmapOutputGS() tmapProxyGS()
Shiny integration for tmap

Export

tmap_save()
Save tmap to file
tmap_animation()
Save tmap animation to file
tmap_leaflet() tmap_grob()
Export tmap to the mode's native object

Datasets included in tmap

World
Spatial data of the world
World_rivers
Spatial data of rivers
land
Spatial data of global land cover
metro
Spatial data of metropolitan areas
NLD_prov NLD_muni NLD_dist
Spatial data of the Netherlands

Helper functions

tm_const()
Constant map variable value
tm_seq()
Specify a numeric sequence
tm_patterns()
Specify fill patterns
tmap_show_values()
Show the available values of categorical map variables
tm_vars()
Specify variables
tm_map_colors()
Color adjacent polygons differently
tm_popup()
Popup specification for interactive maps
tm_label_format()
Label formatting for scales
tm_plot_order()
Determine plotting order of features
theme_ps()
ggplot2 theme for proportional symbols
tmap_tip()
Print a random tip to the console
tmap_icons() marker_icon()
Specify icons
.tmap_providers tmap_provider_credits() tmap_providers()
Get basemap tile providers
tmap_overview()
Overview of tmap layers