<div dir="ltr"><div dir="ltr">Hi Irene,<div><br></div><div>here you have different examples on how you can plot data in fieldtrip. </div><div><a href="http://www.fieldtriptoolbox.org/tutorial/plotting/">http://www.fieldtriptoolbox.org/tutorial/plotting/</a></div><div><br></div><div>I recommend you to follow the tutorial by running the little snippets of code and trying to understand:</div><div>1 what are the fields that your data structure should contain in order to be plotted (e.g. if you want to plot timefrequency amplitide representations you must have a power representation).</div><div>2 how each of the cfg. arguments modify your plot (you can also use the matlab help command in each plotting function to see a description of the different plot features that you can modify).</div><div>3 what different types of data you can find and what are the different ways to plot them.<br><br></div><div>Once you have understood how yo plot the data in the fieldtrip examples, then you can start to generalize and customize those functions to your own needs.</div><div><br></div><div>In your particular example, if you want to plot the topology then you must use <span style="color:inherit;font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:inherit;background-color:rgb(238,238,238)">ft_topoplotER (and not </span><span style="color:inherit;font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:inherit;background-color:rgb(238,238,238)">ft_singleplotER).</span> Remember to indicate what is your helmet sensor/electrodes layout otherwise you will get errors or incorrect representation of your data.</div><div><br></div><div>Good luck and patience.</div><div><br></div><div>alex</div></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jan 7, 2019 at 10:36 AM Irene Varela Leniz <<a href="mailto:irene.varela@alumni.mondragon.edu">irene.varela@alumni.mondragon.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hi Julian, </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I have read about them in Fieldtrip documentation but I still dont manage to do nothing. I am looking for a topographic visualization of data and I am interesed in using Fieldtrip. Moreover, whenever I try different command I get the following error: </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default"><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1" color="#ff0000">Error using ft_checkdata (line 525)</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1" color="#ff0000">This function requires 'timelock' or 'freq' data as input, see ft_datatype_timelock or ft_datatype_freq.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1" color="#ff0000">Error in ft_singleplotER (line 133)</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" size="1" color="#ff0000"> varargin{i} = ft_checkdata(varargin{i}, 'datatype', {'timelock', 'freq'});</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">The data comes from eeglab using eeglab2fieldtrip function, so that we have the data stored in a struct. </font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Thank you in advance, </font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Irene</font></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">El lun., 7 ene. 2019 a las 10:27, Julian Keil (<<a href="mailto:julian.keil@gmail.com" target="_blank">julian.keil@gmail.com</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Hi Irene,<div><br></div><div>it helps if you describe exactly what you want to do (I don’t mean to be rude or patronizing, but check here for suggestions: <a href="https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202" target="_blank">https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202</a>).</div><div><br></div><div>There are many ways to visualize resting state EEG signals, and you don’t need fieldtrip for all of them.</div><div>E.g., if you just want to plot the timecourse of the data, you can use the matlab built-in „plot“ function (e.g. use something like "plot(data.time{1},data.trial{1})“ to plot one trial). If you want to explore your data, ft_databrowser is your friend <a href="http://www.fieldtriptoolbox.org/faq/how_can_i_use_the_databrowser/" target="_blank">http://www.fieldtriptoolbox.org/faq/how_can_i_use_the_databrowser/</a></div><div><br></div><div><div>Best,</div><div><br></div><div>Julian</div><div><br></div><div>
<div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">________________<br>Prof. Dr. Julian Keil<br><br>Biological Psychology<br>Olshausenstrasse 62 - R. 306<br>24118 Kiel, Germany<br><br>+49 - 0431 - 880 - 4872<br><a href="http://www.biopsych.uni-kiel.de/en" target="_blank">http://www.biopsych.uni-kiel.de/en</a><br><br></div></div><div><br><blockquote type="cite"><div>Am 07.01.2019 um 09:57 schrieb Irene Varela Leniz <<a href="mailto:irene.varela@alumni.mondragon.edu" target="_blank">irene.varela@alumni.mondragon.edu</a>>:</div><br class="gmail-m_7037854407697689726gmail-m_-2540327589406583789Apple-interchange-newline"><div><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Good morning Julian, </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Can you help me with plotting some resting state EEG signals? I am new in Fieldtrip and I dont find clear information about this topic and I dont really know how to do plottings in Fieldtrip. I feel like the fieldtrip documentation is a little bit weak....</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Thank you in advance, </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Best regards, </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Irene Varela</div></div><br><div class="gmail_quote"><div dir="ltr">El vie., 4 ene. 2019 a las 14:08, Julian Keil (<<a href="mailto:julian.keil@gmail.com" target="_blank">julian.keil@gmail.com</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Hi Irene,<div><br></div><div>what is the reason to use the extra checkdata step?</div><div>The function checks if the input data has the correct „datatype“ field.</div><div>Since you probably don’t have that field, the function will throw an error.</div><div><br></div><div>Also, I’d recommend using the eeglab2fieldtrip-function to get from EEGlab .set to a fieldtrip-like structure.</div><div><br></div><div>Best,</div><div><br></div><div>Julian</div><div><br></div><div><div><br><blockquote type="cite"><div>Am 04.01.2019 um 12:47 schrieb Irene Varela Leniz <<a href="mailto:irene.varela@alumni.mondragon.edu" target="_blank">irene.varela@alumni.mondragon.edu</a>>:</div><br class="gmail-m_7037854407697689726gmail-m_-2540327589406583789gmail-m_-8045396301063702243Apple-interchange-newline"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hi, </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I am a researcher in Mondragon University working on source reconstruction of EEG data. I am new at fieldtrip and I feel a little bit lost about this software. I have some errors in a code I have developed but I do not manage to solve them. Could you please help me?</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I want to plot EEG data of a channel called 'A1' which is the first row in a 2D matrix variable called data, which is inside EEG structure. The code I have developed is below and I get the following error: </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><i><br></i></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><i>Error using ft_checkdata (line 525)</i></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><i>This function requires 'timelock' or 'freq' data as input, see ft_datatype_timelock or ft_datatype_freq.</i></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><i><br></i></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">The code is the following:</div><div class="gmail_default"><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>clc; clear all; close all;</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>clear variables</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>restoredefaultpath; % set a clean path</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>main='E:\';</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>cd='E:\fieldtrip-20181217'; % change this</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>addpath(cd);</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i><br></i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>ft_defaults;</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>filename = "E:\PBLdata\O200_RS1_final.set"; %cambiar aqui y poner vuestro directorio</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>load(filename, '-mat'); %Create EEG struct</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>location = EEG.chanlocs;</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>data = EEG.data; </i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i><br></i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>cfg = [];</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>cfg.xlim = [-0.2 1.0];</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>cfg.ylim = [-1e-13 3e-13];</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>cfg.channel = 'A1';</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>datos = data(1,:);</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>Ndata = numel(datos);</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>for i=1:Ndata</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i> % check if the input data is valid for this function</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i> datos(i) = ft_checkdata(datos(i), 'datatype', {'timelock', 'freq'});</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>end</i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i><br></i></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><i>figure; ft_singleplotER(cfg,datos);</i></font></div></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><i> </i></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Thank you in advance,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Irene</div><div class="gmail_default"><br></div></div></div></div></div>
_______________________________________________<br>fieldtrip mailing list<br><a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br><a href="https://doi.org/10.1371/journal.pcbi.1002202" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br></div></blockquote></div><br></div></div>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</blockquote></div>
_______________________________________________<br>fieldtrip mailing list<br><a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br><a href="https://doi.org/10.1371/journal.pcbi.1002202" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br></div></blockquote></div><br></div></div>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</blockquote></div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><font color="#000000">Alexis Pérez-Bellido, PhD </font><div><div><div style="font-size:small"><div><font color="#000000"><span style="font-size:12.8px">Donders Institute for Brain, Cognition and Behavior, Nijmegen, Netherlands</span><br style="font-size:12.8px"><span style="font-size:12.8px">Prediction & Attention group</span></font><br style="color:rgb(136,136,136);font-size:12.8px">web: <a href="http://www.predatt.com/" rel="noreferrer" style="color:rgb(17,85,204);font-size:12.8px" target="_blank">https://www.predictivebrainlab.com/</a><br></div><div>gmail: <a href="mailto:alexisperezbellido@gmail.com" style="color:rgb(17,85,204)" target="_blank">alexisperezbellido@gmail.com</a><br>skype: alexisperezbellido</div></div></div><div><div><br><br></div></div></div></div></div></div></div></div></div>