# NOT RUN {
dat_std <- scale_sd(wine[, 2:6])
clas <- wine$Type
bas <- basis_pca(dat_std)
mv <- manip_var_of(bas)
# }
# NOT RUN {
play_manual_tour(basis = bas, data = dat_std, manip_var = mv)
play_manual_tour(basis = bas, data = dat_std, manip_var = mv,
theta = .5 * pi, axes = "right", fps = 5,
angle = .08, phi_min = 0, phi_max = 2 * pi,
aes_args = list(color = clas, shape = clas),
identity_args = list(size = 1.5, alpha = .7),
ggproto = list(ggplot2::theme_void(), ggplot2::ggtitle("My title")),
render_type = render_gganimate)
## Saving output may require additional setup
if(F){ ## Don't run by mistake
## Export plotly .html widget
play_manual_tour(basis = bas, data = dat_std, manip_var = 6,
render_type = render_plotly,
html_filename = "myRadialTour.html")
## Export gganimate .gif
play_manual_tour(basis = bas, data = dat_std, manip_var = 1,
render_type = render_gganimate,
gif_filename = "myRadialTour.gif", gif_path = "./output")
}
# }
Run the code above in your browser using DataLab