View source: R/zDepricated_3_visualize.r
play_tour_path | R Documentation |
, see ggtour
.
Takes the result of tourr::save_history()
or manual_tour()
, interpolates
over the path and renders into a specified render_type
.
play_tour_path( tour_path, data = NULL, angle = 0.05, render_type = render_plotly, ... )
tour_path |
The result of |
data |
Optional, number of columns must match that of |
angle |
Target distance (in radians) between steps. Defaults to .05. |
render_type |
Graphics to render to. Defaults to |
... |
Optionally pass additional arguments to |
render_
For arguments to pass into ...
.
library(spinifex) message("It's suggested to switch to the proto api, see `?ggtour` to get started.") dat_std <- scale_sd(wine[, 2:6]) clas <- wine$Type bas <- basis_pca(dat_std) gt_path <- save_history(dat_std, tour_path = tourr::grand_tour(), max = 5) suppressWarnings( play_tour_path(tour_path = gt_path, data = dat_std) ) suppressWarnings( play_tour_path(tour_path = gt_path, data = dat_std, axes = "bottomleft", angle = .08, fps = 8, 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 a .gif(may require additional setup) if(FALSE){ ## Don't accidentally save file ## Export plotly .html widget play_tour_path(tour_path = gt_path, data = dat_std, render_type = render_plotly, html_filename = "myRadialTour.html") ## Export gganimate .gif play_tour_path(tour_path = gt_path, data = dat_std, render_type = render_gganimate, gif_path = "myOutput", gif_filename = "myRadialTour.gif") }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.