Learn R Programming

eyeris (version 2.0.0)

plot_detrend_overlay: Internal helper to plot detrending overlay

Description

This function replicates the exact detrending visualization from the glassbox() interactive preview mode. It uses robust_plot() to show the most recent detrended pupil signal overlaid with the fitted linear trend.

Usage

plot_detrend_overlay(
  pupil_data,
  pupil_steps,
  preview_n = preview_n,
  plot_params = list(),
  suppress_prompt = TRUE
)

Value

Logical indicating whether detrend overlay was plotted successfully

Arguments

pupil_data

A single block of pupil timeseries data (e.g. eyeris$timeseries$block_1)

preview_n

Number of columns for par(mfrow). Default = 3.

plot_params

A named list of additional parameters to forward to robust_plot()

suppress_prompt

Logical. Whether to skip prompting. Default = TRUE.