<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi Camilla,<div><br></div><div>The easiest is to disable plotting in these two calls, then use the function eeg_rejsuperpose to overlay the results and call eegplot or pop_eegplot. The code is available in the pop_rejmenu function.</div><div><br></div><div>Arno</div><div><br><div><div>On Oct 9, 2014, at 12:09 PM, Camilla Rotvel <<a href="mailto:caro@eng.au.dk">caro@eng.au.dk</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div lang="DA" link="blue" vlink="purple" style="font-family: Helvetica; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div class="WordSection1" style="page: WordSection1;"><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="EN-US">Hi,<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="EN-US"> </span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="EN-US">I would like to make a semiautomated artefact rejection script in MATlab. I import a dataset which is already epoched into EEGlab:<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="EN-US"> </span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: 65.2pt;">EEG = pop_loadset(file);<o:p></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: 65.2pt;"><span style="font-size: 10pt; font-family: 'Courier New';">EEG = eeg_checkset( EEG );</span><span style="font-size: 12pt; font-family: 'Courier New';"><o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 10pt; font-family: 'Courier New';">          <span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New';">[EEG ExtremeValue_reject_index] = pop_eegthresh(EEG,1,[1:124] ,-50,50,-0.80078,1.6953,1,0);<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New';">   </span><span lang="EN-US" style="font-size: 12pt; font-family: 'Courier New';"><o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New';">           [EEG, ~, trend_reject_index] = pop_rejtrend(EEG,1,[1:124] ,640,50,0.3,1,0,1);<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New';">           EEG = eeg_checkset( EEG );</span><span lang="EN-US" style="font-size: 12pt; font-family: 'Courier New';"><o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New';">   </span><span lang="EN-US" style="font-size: 12pt; font-family: 'Courier New';"><o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="EN-US">A window opens, but only the ‘rejtrend’-detected epochs are colored. I would prefer that the eegthresh-detected epochs were also colored. I have successfully made the scroll-plot with the GUI (Tools -> Reject data epochs -> Reject data (all methods) -> “Show all trials marked for rejection by the measure selected above or checked below”, and only check “abnormal data”, “abnormal values” and “abnormal trends”. Here is a picture:<a href="https://www.dropbox.com/s/jlo90hwwn7t8bq7/plot.png?dl=0" style="color: purple; text-decoration: underline;">https://www.dropbox.com/s/jlo90hwwn7t8bq7/plot.png?dl=0</a><o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="EN-US"> </span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="EN-US">Unfortunately EEG.history does not provide me with the right script, which is the script I have already posted here, and as already mentioned it only colors the  ‘rejtrend’-detected epochs. I have checked EEG.reject, and both the eegthresh and rejtrend-data are there, but somehow it gets lost when I‘m plotting from the script.<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="EN-US"> </span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="EN-US">I appreciate any and all help !<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="EN-US">Camilla Rotvel<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="EN-US"> </span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="EN-US" style="font-size: 10pt; color: rgb(89, 89, 89);">___________________________________________<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><b><span lang="EN-US" style="font-size: 10pt; color: rgb(89, 89, 89);">Camilla Arndal Rotvel<o:p></o:p></span></b></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="EN-US" style="font-size: 10pt; color: rgb(89, 89, 89);">Ph.D. student at DuPont Nutrition Biosciences<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="EN-US" style="font-size: 10pt; color: rgb(89, 89, 89);">Edwin Rahrs Vej 38, DK-8220 Brabrand<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="EN-GB" style="font-size: 10pt; color: rgb(89, 89, 89);"> <o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="EN-GB" style="font-size: 10pt; color: rgb(89, 89, 89);">Aarhus University<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="EN-GB" style="font-size: 10pt; color: rgb(89, 89, 89);">Edison, Room 201, Finlandsgade 22, DK-8200 Aarhus N</span><span lang="EN-GB" style="font-size: 10pt; color: rgb(13, 13, 13);"><o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="EN-GB" style="font-size: 10pt; color: rgb(89, 89, 89);"> </span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="EN-GB" style="font-size: 10pt; color: rgb(89, 89, 89);">Phone    :  + 45 21543280<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="PT-BR" style="font-size: 10pt; color: rgb(89, 89, 89);">E-mail     : <span class="Apple-converted-space"> </span><a href="mailto:caro@eng.au.dk" style="color: purple; text-decoration: underline;"><span style="color: rgb(5, 99, 193);">caro@eng.au.dk</span></a><o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="EN-GB" style="font-size: 10pt; color: rgb(89, 89, 89);">___________________________________________</span><span style="color: rgb(89, 89, 89);"><o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div></div>_______________________________________________<br>Eeglablist page:<span class="Apple-converted-space"> </span><a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" style="color: purple; text-decoration: underline;">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>To unsubscribe, send an empty email to<span class="Apple-converted-space"> </span><a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" style="color: purple; text-decoration: underline;">eeglablist-unsubscribe@sccn.ucsd.edu</a><br>For digest mode, send an email with the subject "set digest mime" to<span class="Apple-converted-space"> </span><a href="mailto:eeglablist-request@sccn.ucsd.edu" style="color: purple; text-decoration: underline;">eeglablist-request@sccn.ucsd.edu</a></div></blockquote></div><br></div></body></html>