Hi Fieldtrippers,<br><br>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.<br>The mask structure was obtained from the timelockstatistics function.<br>
<br>I try to plot the mask using the following code:<br><br>cfgplot=[];<br>cfgplot.ylim = [-4 2];<br>cfgplot.maskparameter='mask';<br>ft_singleplotER(cfgplot, Data);<br><br>The structure Data contains the following:<br>
<br>label: {'Fz'}<br>time: [1x101 double]<br>individual: [1x101 double]<br>dimord: 'chan_time'<br>cfg: [1x1 struct]<br>avg: [1x101 double]<br>mask: [1x101 logical]<br><br>This results in the following error:<br>
<br>??? Undefined function or variable 'xvector'.<br><br>Error in ==> ft_singleplotER at 477<br> maskdatavector = reshape(mean(datmask,1), [1 numel(xvector)]);<br><br>The variable xvector is not defined in ft_singleplotER. Replacing xvector with datmask, didn't helped.<br>
However, this resulted in another error:<br><br>??? Error using ==> ft_plot_vector at 105<br>the dimensions of the highlight should be identical to the dimensions of the data<br><br>Error in ==> ft_singleplotER at 514<br>
ft_plot_vector(xval, datavector, 'style', cfg.linestyle{i}, 'color', color, ...<br>
<br>So my questions are: Is this the right function to highlight significant time intervals under a curve? And, if so, how to do this?<br><br>Kind Regards,<br>Mark<br><br><br clear="all"><br>-- <br>Mark Noordenbos, MSc<br>
<br>Radboud University Nijmegen<br>Behavioural Science Institute<br><br>P.O. Box 9104, Room A05.36<br>6500 HE Nijmegen<br>The Netherlands<br><br>Email: <a href="mailto:m.noordenbos@bsi.ru.nl">m.noordenbos@bsi.ru.nl</a><br>
Telephone: +31 24 3612070<br>Fax: +31 24 3616211<br><br><a href="http://www.ru.nl">http://www.ru.nl</a><br><br><br><br>