plot_tfr: Time-frequency plot

View source: R/frequency_plotting.R

plot_tfrR Documentation

Time-frequency plot

Description

Creates a time-frequency plot of an eeg_tfr object. The plot has time on the x-axis and frequency on the y-axis. If no electrode is supplied, it will average over all electrodes.

Usage

plot_tfr(
  data,
  electrode = NULL,
  time_lim = NULL,
  freq_range = NULL,
  baseline_type = "none",
  baseline = NULL,
  fill_lims = NULL,
  interpolate = FALSE,
  na.rm = TRUE,
  fun.data = mean
)

Arguments

data

Object of class eeg_tfr

electrode

Electrode to plot. If none is supplied, averages over all electrodes.

time_lim

Time limits of plot.

freq_range

Vector of two numbers. (e.g. c(8, 40)).

baseline_type

baseline correction to apply. Defaults to "none".

baseline

Baseline period

fill_lims

Custom colour scale (i.e. range of power). e.g. c(-5, 5).

interpolate

Interpolation of raster for smoother plotting.

na.rm

Remove NA values silently (TRUE) or with a warning (FALSE). Defaults to TRUE.

fun.data

Statistical function to use for averaging over electrodes/conditions. Defaults to mean.

Details

Various different baseline options can be applied here (e.g. "db" for decibels, "pc" for percent change, "divide" for division; see rm_baseline for details).

Value

A ggplot

Author(s)

Matt Craddock matt@mattcraddock.com

See Also

rm_baseline()


neuroconductor/eegUtils documentation built on Feb. 3, 2023, 5:33 p.m.