
1.11-2
An manual legend can be created with tm_add_legend.
plot
data(metro)
tm_shape(metro) + 
  tm_symbols(col = "pop2020", size = "pop2020", legend.col.show = FALSE, legend.size.show = FALSE) + 
  tm_add_legend(type = "symbol", border.col = "grey40",
                col = tmaptools::get_brewer_pal("YlOrRd", 4, plot = FALSE), 
                size = sqrt(seq(1:4) / 4),
                labels = c("0 to 10 mln", "10 to 20 mln", "20 to 30 mln", "30 to 40 mln"),
                title = "Population in 2020")

1.11-2
The orientation of a legend block can be changed in the layer functions with legend.is.portrait or legend.[aes].is.portrait with aes the name of the aesthetic (used when there are multiple aesthetics).
plot
data(metro)
tm_shape(metro) + 
  tm_bubbles(size = "pop2020", legend.size.is.portrait = TRUE)

1.11-2
The design.mode can be used to design a static map, especially regarding margins and legend box sizes.
plot
data(World)
data(metro)
tm_shape(World) + 
  tm_polygons("HPI") +
tm_shape(metro) +
  tm_bubbles(size = "pop2020") +
tm_layout(design.mode = TRUE)

1.11-2
Color palettes can be reversed by prefixing the palette name with a "-" sign.
plot
data(World)
tm_shape(World) +
  tm_polygons("well_being", palette = "-Reds")

1.11-2
A panel that is usually used for facets can also be used for a single map.
plot
data(World)
tm_shape(World) +
  tm_polygons("life_exp", title = "") + 
tm_layout(panel.labels = "Life Expectancy")

1.11-2
A stand-alone legend (so without map) can be created by setting legend.only to TRUE.
plot
data(World)
tm_shape(World) +
  tm_polygons("HPI") + 
tm_layout(legend.only = TRUE)

1.11-2
With tm_symbols, any type symbol can be created, also icons.
view
data(metro)
tm_shape(metro[metro$pop2020 > 5e6, ]) +
  tm_symbols(size = "pop2020", shape = tmap_icons(system.file("img/city.png", package = "tmap")))

1.11-2
Each element function has a scalar argument called scale. The overall scaling and font sizes can be set by the scale argument in tm_layout (or globally, in tmap_options).
plot
data(metro)
tm_shape(metro) +
 tm_bubbles(col = "gold", size = "pop2020", scale = 3, title.size = "Population in 2020") +
tm_legend(outside = TRUE)

2.0
The bbox argument of tm_shape can be used in many ways. For instance, another shape can be used from which the bounding box is extracted.
view
data(rivers, NLD_prov)
tm_shape(rivers, bbox = NLD_prov) +
  tm_lines()

2.0
Semi-transparent tile layers can be added with tm_tiles.
view
data(World)
tm_shape(World) +
  tm_polygons("life_exp") +
tm_tiles("Stamen.TonerLines") +
tm_view(set.view = c(lon = 15, lat = 48, zoom = 4))

2.0
The middle color for diverging palette can be set with midpoint.
plot
data(World)
tm_shape(World) +
  tm_polygons("HPI", palette = "RdYlGn", midpoint = 35)

2.0
Facets can be shown as layers in view mode (instead of small multiples).
view
data(World)
tm_shape(World) +
  tm_polygons("HPI", palette = "RdYlGn") +
  tm_facets(by = "continent", as.layers = TRUE, free.coords = FALSE, drop.units = TRUE)

2.0
Basemaps can be disabled as follows, or by setting tmap_options(basemaps = NULL).
view
data(World)
tm_basemap(NULL) +
tm_shape(World) +
  tm_polygons("HPI")

2.0
The filter argument of tm_shape can be used to filter spatial units.
plot
data(World)
tm_shape(World, filter = World$continent == "Africa") +
tm_polygons("HPI")

1.1
Use size.max to set the value mapped to maximum symbol/bubble size. Use scale to increase (or decrease) all symbols/bubbles.
plot
data(metro)
tm_shape(metro) + tm_bubbles("pop2020", size.max = 5e7, scale = 2) + tm_legend(outside = TRUE, outside.position = "bottom")

2.3
Add graticules (latitude longitude lines) with tm_graticules.
plot
data(World)
tm_shape(World) +
  tm_polygons() +
  tm_graticules()

3.0
Use as.count for count/discrete variables.
plot
data(World)
tm_shape(World) + tm_polygons("life_exp", as.count = TRUE)

3.1
View shapes interactively in another projection than the Web Mercator.
view
data(World)
tmap_options(projection = 0, basemaps = NULL)
qtm(World)

3.0
There are many algorithms to create intervals, two of them have been introduced in tmap 3.0 ("dpih" and "headtails"). See ?classInt::classIntervals for details.
plot
data(World)
tm_shape(World) + 
  tm_polygons(rep("inequality",4), style = c("pretty", "jenks", "fisher", "dpih")) + 
  tm_layout(panel.labels = c("pretty", "jenks", "fisher", "dpih"))

3.1
Search for multiple locations directly with qtm. It uses tmaptools::geocode_OSM.
view
qtm(c("Paris", "Amsterdam", "Berlin", "London"))

3.1
With tm_add_legend, it is also possible to add an extra legend title line.
plot
data(World)
tm_shape(World) + 
  tm_polygons("HPI") + 
  tm_add_legend(type = "title", title = "Extra title")

3.2
The object providers is a list of basemap options.
view
tm_basemap(providers$OpenTopoMap)
