# NOT RUN {
library(spinifex)
dat <- scale_sd(penguins[, 1:4])
clas <- penguins$species
bas <- basis_pca(dat)
mv <- manip_var_of(bas)
mt_path <- manual_tour(bas, manip_var = mv)
## d = 2 case
message("facet_wrap_tour wants be called early, so that other proto's adopt the facet_var.")
ggt <- ggtour(mt_path, dat, angle = .3) +
facet_wrap_tour(facet_var = clas, ncol = 2, nrow = 2) +
proto_default(aes_args = list(color = clas, shape = clas),
identity_args = list(size = 1.5))
# }
# NOT RUN {
animate_gganimate(ggt) ## Faceting not likely to play well with `plotly`
# }
Run the code above in your browser using DataLab