[FieldTrip] Maskparameter in ft_singleplotER

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Sun Mar 7 17:04:58 CET 2021


Hi Christina,

I believe that your question is twofold:

1) how can I get the function to work? (I assume that you get an unreported error if you try and execute the code you pasted in your message)
2) can I plot an average + confidence interval for my data?

@1): you probably need to adjust data.label to be a cell-array, i.e. {’some-name’}, rather than ’some-name’, it could be that FieldTrip chokes on this.
@2): at the moment, this is not possible. Thus, at the moment you can only plot the average + mask. Adding support for SEM/std/quantiles is something we recently started discussing on github, https://github.com/fieldtrip/fieldtrip/issues/1558 but nobody has followed up on this (yet), probably because this is a technically hairy issue.

Best wishes,
Jan-Mathijs


On 5 Mar 2021, at 18:59, Christina Vanden Bosch der Nederlanden <christinavb at gmail.com<mailto:christinavb at gmail.com>> wrote:

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<mailto:christinavb at gmail.com>
Website: https://sites.google.com/view/christinavbdn
[https://mailfoogae.appspot.com/t?sender=aY2hyaXN0aW5hdmJAZ21haWwuY29t&type=zerocontent&guid=50ce631f-6362-463f-af7d-2eb80b778864]ᐧ
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20210307/47f26f91/attachment.htm>


More information about the fieldtrip mailing list