View source: R/VisualizationFunctions.R
filt_plot_2d | R Documentation |
This function plots and returns a ggplot2 figure showing fixation filtered and raw gaze coordinates plotted against time. The interval to plot can be defined as a proportion of the data frame or by sample numbers. This function uses one data.frame with fixations and one with sample-by-sample raw data
filt_plot_2d(
raw.data,
filtered.data,
plot.window = c(NA, NA),
raw.columns = c("x.raw", "y.raw"),
filt.columns = c("x", "y"),
fixation.radius = 40,
xres = 1920,
yres = 1080,
verbose = TRUE
)
raw.data |
gaze matrix which must include columns for filtered and unfiltered data as specified in the raw.columns parameter |
filtered.data |
Data frame with fixation data which must include columns for filtered x and y data as specified in the raw.columns parameter as well as the variable onset which indicates the onset of the fixation. Make sure the onset varables match the timing in the raw.data df |
plot.window |
vector defining the time window to plot. If left empty, the 50-65
<0, they are assumed to be proportions, e.g., |
raw.columns |
Names of variable containing raw data. Default x.raw and y.raw |
filt.columns |
Names of variable containing filtered data. Default x and y |
fixation.radius |
Radius of circles showing fixations. |
xres |
horizontal resolution of the screen or area to plot on. Default 1920 |
yres |
vertical resolution of the screen or area to plot on. Default 1080 |
verbose |
if TRUE, print the resulting plot |
a ggplot of raw and fixated values plotted on the y axis and sample number on the x axis
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.