Learn R Programming

spinifex (version 0.1.0)

play_tour_path: Render display of a provided tour path

Description

Takes the result of tourr::save_history() or manual_tour(), interpolates over the path and renders into a selected render_type.

Usage

play_tour_path(tour_path, data = NULL, angle = 0.05,
  render_type = render_plotly, col = "black", pch = 20,
  axes = "center", fps = 3, ...)

Arguments

tour_path

The result of tourr::save_history() or manual_tour().

data

Optional, number of columns must match that of tour_path.

angle

target distance (in radians) between bases.

render_type

Which graphics to render to. Defaults to render_plotly, alternative use render_gganimate.

col

Color of the projected points. Defaults to "black".

pch

Point character of the projected points. Defaults to 20.

axes

Position of the axes: "center", "bottomleft" or "off". Defaults to "center".

fps

Frames/slides shown per second. Defaults to 3.

...

Optionally pass additional arguments to render_type.

Examples

Run this code
# NOT RUN {
flea_std <- rescale(tourr::flea[,1:6])
tpath    <- save_history(flea_std, max = 3)

play_tour_path(tour_path = tpath, data = flea_std, angle = .15)

play_tour_path(tour_path = tpath, data = flea_std, angle = .15, fps = 4,
  render_type = render_gganimate, col = col_of(flea$species), axes = "bottomleft")
# }

Run the code above in your browser using DataLab