plot.eyelinkRecording {eyelinkReader} | R Documentation |
Plot fixations and saccades for a set of trials
Description
This is only a basic plotting utility intended primarily for a quick visual check. Please refer to companion vignette on plotting for details about geoms and implementing your own custom plotting routine.
Usage
## S3 method for class 'eyelinkRecording'
plot(
x,
trial = 1,
show_fixations = TRUE,
fixation_size_property = "duration",
size_legend = ifelse(fixation_size_property == "duration", "Fixation duration [ms]",
NA),
show_saccades = TRUE,
saccade_color_property = "sttime_rel",
color_legend = ifelse(saccade_color_property == "sttime_rel", "Saccade onset [ms]", NA),
background_grobs = NULL,
...
)
Arguments
x |
|
trial |
Trials to be plotted, could be a scalar index,
a vector of indexes, or |
show_fixations |
logical, whether to draw fixation as circles. Defaults to |
fixation_size_property |
Which fixation property is used as circle aesthetics. Defaults to |
size_legend |
An optional legend title, defaults to |
show_saccades |
logical, whether to draw saccades as line segments. Defaults to |
saccade_color_property |
Which saccade property is used as color aesthetics. Defaults to |
color_legend |
An optional legend title, defaults to |
background_grobs |
ggplot2 graphic objects add to the plot before plotting data. |
... |
Addition parameters (unused) |
Value
ggplot object
Examples
data(gaze)
# fixations and saccades for the first trial
plot(gaze)
# fixations for the all trials
plot(gaze, trial = NULL, show_saccades = FALSE)
# saccades for the first two trials
plot(gaze, trial = 1:2, show_fixations = FALSE)
# color codes duration of a saccade
plot(gaze, saccade_color_property = "duration")