# NOT RUN {
library(spinifex)
dat <- scale_sd(penguins[, 1:4])
clas <- penguins$species
gt_path <- save_history(dat, grand_tour(), max = 3)
## geom_density_2d args can be passed in identity_args (bins, binwidth, breaks)
ggt <- ggtour(gt_path, dat, angle = .3) +
proto_density2d(aes_args = list(color = clas, fill = clas),
identity_args = list(binwidth = .3)) +
proto_point(aes_args = list(color = clas, shape = clas),
identity_args = list(alpha = .2)) +
proto_basis()
# }
# NOT RUN {
animate_plotly(ggt)
# }
Run the code above in your browser using DataLab