[FieldTrip] Maskparameter in ft_singleplotER

Christina Vanden Bosch der Nederlanden christinavb at gmail.com
Fri Mar 5 18:59:38 CET 2021


Hello!

I have been plotting my coherence data using Matlab's built-in plot
functions, but I'd like to take advantage of fieldtrip's
cfg.maskparameters for graphing significant regions of coherence in my
data. I want to plot the average coherence across subjects and then make
the thickness of the line represent significant regions. I'm trying to
"trick" fieldtrip into thinking that my datatype is freq, but it won't let
me plot just the average (and I read that maskparameter is omitted when
trying to average over repetitions). So how do I trick fieldtrip into
plotting my data as an average across participants, with std error bars AND
the mask parameter for sig regions of coherence (x-axis: freq, y-axis:
coherence).

data =
struct with fields:

powspctrm: [33×790 double] %this is actually participants_freq
          avg: [1×790 double] %avg across all participants for all freqs

    stderror: [1×790 double] %stderror across all participants for all freqs
       dimord: 'chan_freq'
         freq: [1×790 double]
       sigreg: [1×790 logical] %0's for nonsig 1's for sig
        label: 'E25' %just put in a random chan label to trick ft into
thinking this was a 'chan_freq' datatype resulting from ft_freqanalysis


cfg = [ ];
cfg.parameter = 'avg';
cfg.maskparameter = 'sigreg';
cfg.maskstyle = 'thickness'
cfg.title = 'All conditions, sig coherence';
ft_singleplotER(cfg, data)

-- 
Christina M. Vanden Bosch der Nederlanden
Postdoctoral Fellow
Brain and Mind Institute
Western University
christinavb at gmail.com
Website: https://sites.google.com/view/christinavbdn
ᐧ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20210305/8e98736f/attachment.htm>


More information about the fieldtrip mailing list