[Eeglablist] PLotting erspdata using 'imagesc'

Katherine R. Naish naishek at mcmaster.ca
Sat Feb 7 23:26:02 PST 2015


Hi all,

This is just a sanity-check (hopefully)...

I use the following code to average ersp values across electrodes (the 3rd
dimension of 'erspdata'), calculate p-values for significance of modulation
from baseline, and plot significant ersps for each region:

for reg=1:regions

erspdata_regions{1,1}(:,:,reg,:) = mean(erspdata{1,1}(:,:,(reg*chanlength)
- (chanlength-1):reg*chanlength,:),3); %average across electrodes within
region

pvals = std_stat({erspdata_regions{1,1}(:,:,reg,:)
zeros(size(erspdata_regions{1,1}(:,:,reg,:))) }', 'condstats', 'on',
'mcorrect', 'fdr'); %significance of modulation

tmpersp = mean(erspdata_regions{1,1}(:,:,reg,:),4); % average across
subjects

tmpersp(pvals{1}>0.05) = 0; % zero out non-significant values (without this
line, plots all modulation)

subplot(regions/2,2,reg)

imagesc(ersptimes, erspfreqs, tmpersp, [zmin zmax]);

end

>From what I understand, the 'imagesc' function takes the min and max values
of 'erspfreqs' as the min and max values for the y-axis, but the yticks are
evenly spaced between these values. So, where erspfreqs is on a log scale,
the labels on the y-axis produced by imagesc are not accurate.

Is that correct?

Thank you,
Katherine

-- 
Katherine R. Naish
Social Brain, Body, & Action Lab
Department of Psychology, Neuroscience & Behaviour
McMaster University
Hamilton, ON, CA
(905) 525-9140 ext. 26755
https://www.researchgate.net/profile/Katherine_Naish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20150208/99ee6b70/attachment.html>


More information about the eeglablist mailing list