View source: R/VisualizationFunctions.R
| filt_plot_temporal | R Documentation | 
This function plots and returns a ggplot2 figure showing two time series of gaze coordinates plotted against time. The interval to plot can be defined as a proportion of the data frame, by timestamps, or by sample numbers. Use this function to plot data before and after processing or filtering to examine their effects. For example, unprocessed x or y coordinates can be plotted against x and y coordinates following pre-processing and/or event detection with a fixation detection algorithm Either the x or the y vector is plotted
filt_plot_temporal(
  data_in,
  plot.window = c(NA, NA),
  var1 = "x.raw",
  var2 = "x",
  x.index.var = "sample.index",
  verbose = TRUE
)
| data_in | gaze matrix which must include columns for filtered and unfiltered data as specified in the var1 and var2 paramters | 
| plot.window | vector defining the time window to plot. If left empty, the 50-65
<0, they are assumed to be proportions, e.g.,  | 
| var1 | Name of the first variable to plot. Default "x.raw" | 
| var2 | Name of the second variable to plot (overlayed on var1) Default: "x" | 
| x.index.var | Name of the variable to plot on the X axis, for example timestamp or sample index. If the default setting is used, gaze coordinates are plotted against sample number in the selected data interval. | 
| verbose | If TRUE, print the resulting plot | 
a ggplot with gaze coordinates plotted on the y axis and sample number on the x axis
new.plot <- filt_plot_temporal(sample.data.classified, plot.window = c(1000, 2000))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.