[Eeglablist] How to use pop_spectopo in code like it is in the GUI

Naviya Lall naviyal at iiitd.ac.in
Tue Mar 24 23:34:26 PDT 2026


Hello all,

I've performed EEG preprocessing on EEGLAB GUI for the most part and I've
recently written a script to perform the basics like downsampling and
filtering etc. I want to plot the 'spectra and maps' after each step in the
code to visualise the data but it is not plotting the scalp maps like the
GUI does.

*These are the parameters I use in the GUI window-*
Epoch time range to analyze [min_ms max_ms]: 0 314598
Percent data to sample (1 to 100):  100
Frequencies to plot as scalp maps (Hz): 6 10 22
Plotting frequency range [lo_Hz hi_Hz]: 2 50
Spectral and scalp map options (see topoplot): 'electrodes', 'off'


This script-
figure;
pop_spectopo(EEG, 1, [], ...
'EEG', ...
'percent', 100, ...
'freqrange', [2 50], ...
'freqs', [6 10 22], ... % default EEGLAB scalp map frequencies
'electrodes', 'off', ...
'title', 'Filtered and downsampled');
Gives me the right plot *but the scalp maps at 6, 10, 22 are missing* and I
am not sure why. All my channel locations seem to be right. If there is a
small solution that I am missing, like a plugin, please let me know, I am a
novice coder.

Best regards,
Naviya

--
Naviya Lall
Junior Research Fellow
Cognitive Science Lab
IIIT Delhi
naviyalalluni.wixsite.com <https://urldefense.com/v3/__https://naviyalalluni.wixsite.com/naviyalall__;!!Mih3wA!Bup0KZI-0iFPzwa2qgzaD8_vZvTix77pC4vwNtB2nUaNkpMwE3AfMf20LeBqBpRzJIpW1OxuSgROYy26ZnwqStqR$ >


More information about the eeglablist mailing list