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.
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
)
Object of class eeg_tfr
Electrode to plot. If none is supplied, averages over all electrodes.
Time limits of plot.
Vector of two numbers. (e.g. c(8, 40)).
baseline correction to apply. Defaults to none
.
Baseline period
Custom colour scale (i.e. range of power). e.g. c(-5, 5).
Interpolation of raster for smoother plotting.
Remove NA values silently (TRUE) or with a warning (FALSE). Defaults to TRUE.
Statistical function to use for averaging over
electrodes/conditions. Defaults to mean
. Alternatively, supply
weighted.mean
, which will attempt to weight separate conditions
appropriately.
A ggplot
object
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).