Simply EEGLAB

ERP image

Station 7 · Lesson 3 · EEGLAB 2026.1

In the GUI

  1. PlotChannel ERP image
  2. Channel ...Pz
  3. Smoothing 1
  4. Time limits (ms) -200 800
  5. Plot scalp mapPlot ERPPlot colorbarOk
  6. PlotChannel ERP image
  7. Smoothing 10
  8. Epoch-sorting field latency
  9. Event type(s) rt
  10. Event time range 0 1000
  11. RescaleAlignOk no
  12. AlignTime limits (ms)Ok Inf

Script

EEG = pop_loadset('D1_epochs_clean.set', pwd);
chan = find(strcmp({EEG.chanlocs.labels}, 'Pz'));
rt = eeg_getepochevent(EEG, 'type', {'rt'}, 'timewin', [0 1000]);
fprintf('%d of %d epochs have a response, median RT %.0f ms\n', ...
    sum(~isnan(rt)), EEG.trials, median(rt, 'omitnan'));
figure; pop_erpimage(EEG, 1, chan, [], 'Pz', 1, 1, {}, [], '', ...
    'erp', 'on', 'cbar', 'on', 'limits', [-200 800], ...
    'topo', {chan EEG.chanlocs EEG.chaninfo});
figure; pop_erpimage(EEG, 1, chan, [], 'Pz sorted by RT', 10, 1, {'rt'}, [0 1000], 'latency', ...
    'erp', 'on', 'cbar', 'on', 'limits', [-200 800], ...
    'topo', {chan EEG.chanlocs EEG.chaninfo});
figure; pop_erpimage(EEG, 1, chan, [], 'Pz aligned to response', 10, 1, {'rt'}, [0 1000], 'latency', ...
    'align', Inf, 'erp', 'on', 'cbar', 'on', ...
    'topo', {chan EEG.chanlocs EEG.chaninfo});

Which value should I choose?

SettingValue
Smoothing1 for a first look, then 5 to 10
Event time range0 1000 for D1
ChannelPz for a late positive component, POz or Oz for alpha
Color limits (see Help)Empty (the default) or a fraction such as 0.9
Downsampling1
AlignEmpty, or Inf to view from the response side

For your Methods

Single-trial ERP images at Pz were sorted by reaction time and smoothed with a 10-trial moving average (pop_erpimage, EEGLAB 2026.1); [N] epochs without a response between 0 and 1000 ms were excluded from the image.

Full lesson: https://simplyeeglab.pages.dev/en/lesson/erp-image/

Content license: CC BY-NC-SA 4.0 · MIT (code)

An independent learning site, not affiliated with EEGLAB or SCCN.