show_slice {detourr}  R Documentation 
An implementation of the Slice Tour described in Laa et al., 2020. Points close to the projection plane are highlighted, and those far away are faded out.
show_slice(
x,
...,
palette = viridis,
center = TRUE,
axes = TRUE,
edges = NULL,
paused = TRUE,
scale_factor = NULL,
slice_relative_volume = 0.1,
anchor = NULL
)
x 
a 
... 
used to support aesthetic parameters for the plot, including

palette 
Colour palette to use with the colour aesthetic. Can be:

center 
If TRUE, center the projected data to (0, 0, 0). 
axes 
Can be one of:

edges 
A two column numeric matrix giving indices of ends of lines. 
paused 
whether the widget should be initialised in the 'paused' state 
scale_factor 
used as a multiplier for the point coordinates so they are displayed on a sensible range. Defaults to the reciprocal of maximum distance from a point to the origin. 
slice_relative_volume 
number default 0.1. Controls the relative volume of the slice and thus the number of points which are highlighted. This is an approximate value and is only accurate for values << 1 
anchor 
anchor vector of length p to offset the projection plane when calculating the distance from each point to the projection plane. 
This display method produces an interactive scatterplot animation which supports both 2D and 3D tours. Linked selection and filtering is also supported using crosstalk. The set of interactive controls available are:
A timeline with a play / pause button and indicators at the position of each basis used. The basis indicators can be hovered with the mouse to show the index of the basis, or clicked to jump to that basis. The timeline also allows for clicking and dragging of the scrubber to move to any individual frame of the animation.
Orbit controls. For the 2D variant, this allows the projection to be rotated by clicking and dragging from left to right. For the 3D variant, full orbit controls are available by clicking and dragging. For both orbit and pan controls, the scroll wheel can be used to zoom.
Pan controls, which work similarly to orbit controls but move the camera laterally / vertically rather than rotating
Resetting of the orbit and pan controls
Selection and highlighting. Multiple selection is possible by using the shift key
Colouring / brushing of highlighted points
An object of class htmlwidget
Laa, U., Cook, D., & Valencia, G. (2020). A slice tour for finding hollowness in highdimensional data. Journal of Computational and Graphical Statistics, 29(3), 681687.
show_scatter
x < geozoo::torus(p = 4, n = 10000)$points >
tibble::as_tibble(.name_repair = "unique")
detour(x, tour_aes(projection = everything())) >
tour_path(grand_tour(2)) >
show_slice(slice_relative_volume = 0.1)