View source: R/visualization.R
anim_scanpath | R Documentation |
This function creates an animated visualization of a fixation scanpath using gganimate.
anim_scanpath(
x,
bg_image = NULL,
xlim = range(x$x),
ylim = range(x$y),
alpha = 1,
anim_over = c("index", "onset"),
type = c("points", "raster"),
time_bin = 1
)
x |
A 'fixation_group' object. |
bg_image |
An optional image file name to use as the background. |
xlim |
The range in x coordinates (default: range of x values in the fixation group). |
ylim |
The range in y coordinates (default: range of y values in the fixation group). |
alpha |
The opacity of each dot (default: 1). |
anim_over |
Animate over index (ordered) or onset (real time) (default: c("index", "onset")). |
type |
Display as points or a raster (default: c("points", "raster")). |
time_bin |
The size of the time bins (default: 1). |
A gganimate object representing the animated scanpath.
Other visualization:
plot.eye_density()
,
plot.fixation_group()
# Create a fixation group
fg <- fixation_group(x=c(.1,.5,1), y=c(1,.5,1), onset=1:3, duration=rep(1,3))
# Animate the scanpath for the fixation group
anim_sp <- anim_scanpath(fg)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.