# NOT RUN {
library(spinifex)
dat <- scale_sd(penguins[, 1:4])
clas <- penguins$species
bas <- basis_pca(dat)
mv <- manip_var_of(bas)
gt_path <- save_history(dat, grand_tour(), max_bases = 5)
ggt <- ggtour(gt_path, dat, angle = .2) +
proto_text(list(color = clas))
# }
# NOT RUN {
animate_plotly(ggt)
# }
# NOT RUN {
## Custom labels, subset of points
ggt2 <- ggtour(gt_path, dat) +
proto_text(list(color = clas, size = as.integer(clas)),
list(alpha = .7),
row_index = 1:15)
# }
# NOT RUN {
animate_plotly(ggt2)
# }
Run the code above in your browser using DataLab