plotXYmmpf: Plot x-, y-axis marker movement per frame

View source: R/plotXYmmpf.R

plotXYmmpfR Documentation

Plot x-, y-axis marker movement per frame

Description

Plots separate lines for the x,y marker values (y-axis) per frame (x-axis).

Usage

plotXYmmpf(
  colFrames,
  colX,
  colY,
  colCond = "",
  center = TRUE,
  color = c("red", "orange"),
  title = "",
  overplot = FALSE
)

Arguments

colFrames

Numeric vector containing the frames for which x/y-values should be plotted

colX

Numeric vector with x values (same length as frames vector)

colY

Numeric vector with y values (same length as frames vector)

colCond

Character vector containing the stimuli presented at each frame (same length as frames vector). Stimulus labels must be unique. Optional. Default is NA.

center

If TRUE, center x/y values by setting the x/y values to 0 at the first (appropriate, e.g. non NA frame) frame. Default = TRUE

color

Character vector of two values to define color for x/y values of the Marker. Default is c('red','orange').

title

Default is no title.

overplot

If TRUE, only the x/y lines, but no base graph is plotted. Default is FALSE.

Value

See vignette for example plots.

Author(s)

Axel Zinkernagel zinkernagel@uni-wuppertal.de, Rainer Alexandrowicz rainer.alexandrowicz@aau.at

Examples

# Select data of a subject at relevant frame sections
data_Subj2Cen <- subset(dataStdFCen, subset = ((dataSmm$subject == 2) & 
                       (dataSmm$Frame >= 690)& (dataSmm$Frame <= 1610)))
plotXYmmpf(colFrames = data_Subj2Cen$Frame, colX = data_Subj2Cen$BR4_x, 
           colY = data_Subj2Cen$BR4_y, colCond = data_Subj2Cen$Stimulustype, 
           center = FALSE, title = "Subject 2, BR4")
  

axzinker/blenderFace documentation built on Feb. 27, 2024, 10:25 a.m.