-
Notifications
You must be signed in to change notification settings - Fork 125
Closed
Description
Hi,
Thank you very much for all your work on this wonderful package !
I have a problem : I'm trying to put an inset map in the main map with tm_inset(), but it doesn't work.
So to understand I tried the example on the documentation :
NLD_muni$pop_est_dens = NLD_muni$population / NLD_muni$area
tm_NLD = tm_shape(NLD_muni) +
tm_polygons(fill = "pop_est_dens",
fill.legend = tm_legend_hide(),
fill.scale = tm_scale_continuous_sqrt(values = "viridis", limits = c(0, 6500)),
col = NULL) +
tm_shape(NLD_prov) +
tm_borders()
tm_shape(World) +
tm_polygons(fill = "pop_est_dens",
col = "black",
fill.scale = tm_scale_continuous_sqrt(values = "viridis", limits = c(0, 6500))) +
tm_inset(tm_NLD, position = c("left", "bottom")) +
tm_crs("+proj=robin")
But I have the same error :
Error in UseMethod("tmapGridCompPrepare") :
no applicable method for 'tmapGridCompPrepare' applied to an object of class "c('tm_inset_tmap', 'tm_inset', 'tm_component', 'tm_element', 'list')"
My config : Windows 10, with R 4.4.1 and the last version of tmap (4.1).
Do I miss something or is there a problem somewhere ?
Thanks a lot !
Metadata
Metadata
Assignees
Labels
No labels