-
Notifications
You must be signed in to change notification settings - Fork 125
Open
Labels
Description
@mtennekes see the example below. My assumption is that the tm_facets first specifies the faceting grid, which is then animated based on another variable. However, currently, the tm_facets call is overwritten by tm_animate... What's your thinking on this?
library(tmap)
set.seed(323)
metro$group = as.factor(sample(1:3, nrow(metro), replace = TRUE))
metro$group2 = as.factor(sample(1:3, nrow(metro), replace = TRUE))
tm_shape(metro) +
tm_bubbles(size.free = FALSE) +
tm_facets(by = "group") +
tm_animate(by = "group2")
#> [tip] Consider a suitable map projection, e.g. by adding `+ tm_crs("auto")`.
#> This message is displayed once per session.
Created on 2025-07-06 with reprex v2.1.1