-
Notifications
You must be signed in to change notification settings - Fork 125
Closed
Labels
LayoutIssues related to map layout (including many maps, facets, positions, etc.)Issues related to map layout (including many maps, facets, positions, etc.)
Description
Hi, i am struggling to get tm_inset()
to work with a tmap object. It works with a bounding box and ggplot object but not a tmap object - https://r-tmap.github.io/tmap/reference/tm_inset.html
Am i missing something or is this a bug?
For example - tmap object, does not show
#inset object
inset <- tm_shape(World)+
tm_polygons()
tm_shape(NLD_dist) +
tm_polygons(
fill = "dwelling_value",
fill.scale = tm_scale_continuous_pseudo_log(values = "-cols4all.pu_gn_div"),
col = NULL) +
tm_shape(NLD_muni) +
tm_borders(col = "black", lwd = 0.5) +
tm_shape(NLD_prov) +
tm_borders(col = "black", lwd = 1.5) +
#add inset map
tm_inset(inset , height = 12, width = 12, position = c("left", "top")) +
tm_compass(position = c("left", "top"), )
ggplot2 object, works fine.
p = ggplot(World, aes(x = gender, y = press, colour = continent)) +
geom_point() +
theme_bw()
tm_shape(NLD_dist) +
tm_polygons(
fill = "dwelling_value",
fill.scale = tm_scale_continuous_pseudo_log(values = "-cols4all.pu_gn_div"),
col = NULL) +
tm_shape(NLD_muni) +
tm_borders(col = "black", lwd = 0.5) +
tm_shape(NLD_prov) +
tm_borders(col = "black", lwd = 1.5) +
tm_inset(p, height = 12, width = 12, position = c("left", "top")) +
tm_compass(position = c("left", "top"), )
Thanks,
Andy
Metadata
Metadata
Assignees
Labels
LayoutIssues related to map layout (including many maps, facets, positions, etc.)Issues related to map layout (including many maps, facets, positions, etc.)