Starting with a toy example I can quickly get an interactive map in tmap
with the following code:
library(tmap)
tmap_mode("view")
data("World", "metro")
tm_shape(World) +
tm_polygons('life_exp',
legend.show = TRUE) +
tm_shape(metro) +
tm_dots("pop2010",
col = "red",
legend.show = TRUE) +
tm_format("World")
I correctly get the legend for polygons. But failed to get one for tm_dots
despite setting legend.show = TRUE
. Is there any way around it?