plot_velocity_profiles: Create ggplot of saccade velocity profiles

View source: R/VisualizationFunctions.R

plot_velocity_profilesR Documentation

Create ggplot of saccade velocity profiles

Description

This function plots and returns a ggplot showing velocity profiles of saccades plotted against time. Saccades should be generated with the ivt.filter functions with the save.velosity.profiles parameter set to TRUE. The interval to plot is defined by saccade number as they appear in the sacccades data frame.

Usage

plot_velocity_profiles(saccades, onset = NA, offset = NA, verbose = TRUE)

Arguments

saccades

data frame including saccades. Each saccade must have a list with a vector of the veloctity profiles

onset

first saccade to plot. The value must correspond to a number in the variable "number" in the saccades data frame. If left empty, all saccades are plotted

offset

last saccade to plot. The value must correspond to a number in the variable "number" in the saccades data frame.

verbose

If TRUE, print the resulting plot

Value

ggplot with velocity profiles

Examples

new.plot <- plot_velocity_profiles(sample.data.saccades, onset = 10, offset = 20)

kollaR documentation built on April 13, 2025, 5:11 p.m.