[FieldTrip] Plotting mask using ft_singleplotER

Mark Noordenbos mark.noordenbos at gmail.com
Mon Jan 9 17:34:52 CET 2012


Hi Fieldtrippers,

I was wondering if it is possible to plot a highlighted area under a curve
using the 'mask' option of the function ft_singleplotER to indicate time
intervals with significant effects.
The mask structure was obtained from the timelockstatistics function.

I try to plot the mask using the following code:

cfgplot=[];
cfgplot.ylim = [-4 2];
cfgplot.maskparameter='mask';
ft_singleplotER(cfgplot, Data);

The structure Data contains the following:

label: {'Fz'}
time: [1x101 double]
individual: [1x101 double]
dimord: 'chan_time'
cfg: [1x1 struct]
avg: [1x101 double]
mask: [1x101 logical]

This results in the following error:

??? Undefined function or variable 'xvector'.

Error in ==> ft_singleplotER at 477
    maskdatavector = reshape(mean(datmask,1), [1 numel(xvector)]);

The variable xvector is not defined in ft_singleplotER. Replacing xvector
with datmask, didn't helped.
However, this resulted in another error:

??? Error using ==> ft_plot_vector at 105
the dimensions of the highlight should be identical to the dimensions of
the data

Error in ==> ft_singleplotER at 514
    ft_plot_vector(xval, datavector, 'style', cfg.linestyle{i}, 'color',
color, ...

So my questions are: Is this the right function to highlight significant
time intervals under a curve? And, if so, how to do this?

Kind Regards,
Mark



-- 
Mark Noordenbos, MSc

Radboud University Nijmegen
Behavioural Science Institute

P.O. Box 9104, Room A05.36
6500 HE Nijmegen
The Netherlands

Email: m.noordenbos at bsi.ru.nl
Telephone: +31 24 3612070
Fax:          +31 24 3616211

http://www.ru.nl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120109/e97b84c7/attachment-0001.html>


More information about the fieldtrip mailing list