Learn R Programming

Epoch (version 1.0.3)

plot,Epoch,missing-method: Plot method for Epoch objects

Description

Plot method for Epoch objects

Usage

# S4 method for Epoch,missing
plot(
  x,
  y,
  gap = 2,
  groupIndex = NULL,
  timeResolution = 2048,
  maxLabels = 50,
  x.lab.size = 2,
  ...
)

Value

plot: A ggplot object showing iEEG electrode traces

Arguments

x

An Epoch object

y

Not used (for S4 method compatibility)

gap

Numeric value specifying the gap between electrode traces (default: 2)

groupIndex

Integer or string. A group of electrodes to show together in a different color. If NULL(default), all electrodes are shown in the same color.

timeResolution

Maximum number of time points to keep for each electrode (default: 2048)

maxLabels

Maximum number of electrode labels to display on the y-axis (default: 50)

x.lab.size

Size of the x-axis label text (default: 2)

...

Additional arguments (not currently used)

See Also

Other Epoch methods: coltimes(), crop(), resample(), show,Epoch-method

Examples

Run this code
# Create an Epoch object
epoch_data <- matrix(rnorm(1000), nrow = 10)
rownames(epoch_data) <- paste0("Electrode_", 1:10)
epoch <- Epoch(epoch_data, startTime = 0, samplingRate = 100)

# Plot the epoch
plot(epoch)


Run the code above in your browser using DataLab