<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Courier;
panose-1:2 7 4 9 2 2 5 2 4 4;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
p.gmail-p2, li.gmail-p2, div.gmail-p2
{mso-style-name:gmail-p2;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
p.gmail-p1, li.gmail-p1, div.gmail-p1
{mso-style-name:gmail-p1;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.gmail-s1
{mso-style-name:gmail-s1;}
span.gmail-s2
{mso-style-name:gmail-s2;}
span.gmail-s3
{mso-style-name:gmail-s3;}
span.EmailStyle23
{mso-style-type:personal;
font-family:"Arial",sans-serif;
color:#002060;
font-weight:normal;
font-style:normal;
text-decoration:none none;}
span.EmailStyle25
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:85.05pt 56.7pt 85.05pt 56.7pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Hi Anderson<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>You may need to tweak the “std_dipplot” a little. As I just looked into the function, if you want to plot clusters with their respective dipoles, you will stay in the main function (std_dipplot).<o:p></o:p></p><p class=MsoNormal>The function has a gigantic for loop from line 232 to 303 (I’m on eeglab ver 14.1.2b). The loop plots each cluster (for N clusters) at a time and the centroid of the cluster actually is the last dipole of the cluster. On the line 263 you’ll see that it is saving a cell string (dip_color(1:end-1) = {‘b’}), telling the “dipplot” function (which plots the dipoles) that every dipole should be blue, except the last one which is the centroid. You can substitute the right hand side of this line with your cell array that specify color for each individual dipole.<o:p></o:p></p><p class=MsoNormal>The cell array for color can look like: { ‘b’ ‘r’ ‘c' …} or you can use color triplets as M*3 arrays (M is the number of dipoles, equal to 1:end-1), and use num2cell(M*3,2) to create your cell array.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>If you have multiple clusters, I’m sure you can add an input to the main function to account for that as well.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Hope it helps.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Best<o:p></o:p></p><p class=MsoNormal>Seyed<o:p></o:p></p><p class=MsoNormal>--<o:p></o:p></p><p class=MsoNormal>Seyed Yahya Shirazi, M.Sc.<o:p></o:p></p><p class=MsoNormal>BRaIN Lab<o:p></o:p></p><p class=MsoNormal>Universtiy of Central Florida<o:p></o:p></p><p class=MsoNormal><a href="mailto:shirazi@ieee.org"><span style='color:#0563C1'>shirazi@ieee.org</span></a><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b>From:</b> Anderson de Souza Castelo Oliveira <oliveira@mp.aau.dk> <br><b>Sent:</b> Tuesday, December 4, 2018 3:27 AM<br><b>To:</b> Ramón Martinez <nucleuscub@gmail.com><br><b>Cc:</b> eeglablist@sccn.ucsd.edu<br><b>Subject:</b> Re: [Eeglablist] change individual IC color in clustered 3D image<o:p></o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=DA style='font-size:10.0pt;font-family:"Arial",sans-serif;color:#002060'>Dear Ramon,<o:p></o:p></span></p><p class=MsoNormal><span lang=DA style='font-size:10.0pt;font-family:"Arial",sans-serif;color:#002060'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial",sans-serif;color:#002060'>Thanks for the recommendations. My question was related to changing the color of different specific dipoles from the same cluster (not different clusters with different colors). Is there a possibility to do it?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial",sans-serif;color:#002060'>Best regards,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial",sans-serif;color:#002060'>Anderson<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial",sans-serif;color:#002060'><o:p> </o:p></span></p><p class=MsoNormal><b>From:</b> Ramón Martinez <<a href="mailto:nucleuscub@gmail.com">nucleuscub@gmail.com</a>> <br><b>Sent:</b> 4. december 2018 00:36<br><b>To:</b> Anderson de Souza Castelo Oliveira <<a href="mailto:oliveira@mp.aau.dk">oliveira@mp.aau.dk</a>>; EEGLAB List <<a href="mailto:eeglablist@sccn.ucsd.edu">eeglablist@sccn.ucsd.edu</a>><br><b>Subject:</b> Re: [Eeglablist] change individual IC color in clustered 3D image<o:p></o:p></p><p class=MsoNormal><span lang=DA><o:p> </o:p></span></p><div><div><p class=MsoNormal><span lang=DA>Hi Anderson, <o:p></o:p></span></p><div><p class=MsoNormal><span lang=DA> There are a couple of ways to do this. See below two of them:<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=DA><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=DA> <b>Use std_dipplot.m from the command window (the easy way)</b><o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=DA>For this, you can use the following sample code.<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=DA><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=DA>STUDY = std_dipplot(STUDY, ALLEEG, 'clusters', [2 3], 'design',1, 'mode', 'multicolor');<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=DA><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=DA> This will plot the clusters 2 and 3 using different colors. The colors here are defined in a list inside the function std_dipplot. But if you want to pass a new set of colors, then you may want to use the option 'dipcolor' in the same function. This will allow you to define a custom list of colors for each cluster.<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=DA><o:p> </o:p></span></p></div><div><p class=MsoNormal><b><span lang=DA> Command line code (the hard way)</span></b><span lang=DA><o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=DA>Make sure to get the handle of the figure where dipoles are plotted. Click anywhere on your figure and then:<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=DA> </span><span class=gmail-s1><span lang=DA style='font-family:Courier;color:black'>h = gcf; </span></span><span lang=DA style='font-family:Courier;color:#25992D'>% get handles of figure</span><span lang=DA><o:p></o:p></span></p></div><p class=gmail-p2 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span class=gmail-s1><span lang=DA style='font-family:Courier;color:black'>hdipoles = findobj(h,</span></span><span lang=DA style='font-family:Courier;color:#B245F3'>'-regexp'</span><span class=gmail-s1><span lang=DA style='font-family:Courier;color:black'>,</span></span><span lang=DA style='font-family:Courier;color:#B245F3'>'Tag'</span><span class=gmail-s1><span lang=DA style='font-family:Courier;color:black'>,</span></span><span lang=DA style='font-family:Courier;color:#B245F3'>'dipole\w'</span><span class=gmail-s1><span lang=DA style='font-family:Courier;color:black'>,</span></span><span lang=DA style='font-family:Courier;color:#B245F3'>'Type'</span><span class=gmail-s1><span lang=DA style='font-family:Courier;color:black'>,</span></span><span lang=DA style='font-family:Courier;color:#B245F3'>'surface'</span><span class=gmail-s1><span lang=DA style='font-family:Courier;color:black'>); </span></span><span class=gmail-s2><span lang=DA style='font-family:Courier;color:#25992D'>% Get dipole handles in the figure</span></span><span lang=DA style='font-family:Courier;color:#B245F3'><o:p></o:p></span></p><p class=gmail-p1 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span class=gmail-s1><span lang=DA style='font-family:Courier;color:black'>set(hdipoles,</span></span><span class=gmail-s3><span lang=DA style='font-family:Courier;color:#B245F3'>'FaceColor'</span></span><span class=gmail-s1><span lang=DA style='font-family:Courier;color:black'>, [0 1 1]); </span></span><span lang=DA style='font-family:Courier;color:#25992D'>% Set color for dipoles (here [0 1 1] is fuccia)<o:p></o:p></span></p><p class=gmail-p1 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span lang=DA style='font-family:Courier;color:#25992D'><o:p> </o:p></span></p><p class=gmail-p1 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span lang=DA style='font-family:"Arial",sans-serif;color:black'>Hope this helps,</span><span lang=DA><o:p></o:p></span></p><p class=gmail-p1 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span lang=DA style='font-family:"Arial",sans-serif;color:black'>Ramon</span><span lang=DA><o:p></o:p></span></p><div><p class=MsoNormal><span lang=DA><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=DA><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=DA> <o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=DA><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=DA> <o:p></o:p></span></p></div></div></div><p class=MsoNormal><span lang=DA><o:p> </o:p></span></p><div><div><p class=MsoNormal><span lang=DA>On Mon, Dec 3, 2018 at 12:08 PM Anderson de Souza Castelo Oliveira <<a href="mailto:oliveira@mp.aau.dk" target="_blank">oliveira@mp.aau.dk</a>> wrote:<o:p></o:p></span></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial",sans-serif;color:#002060'>Hi all,</span><span lang=DA><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial",sans-serif;color:#002060'> </span><span lang=DA><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial",sans-serif;color:#002060'>I have been working on an analysis where I have some EEG clusters, and I’d like to use different colors to highlight two different “sub-samples” that I found in each cluster. Is there a way to change the color of the clustered ICs in the 3D view of the cluster (like in the figure I attached the link to: <a href="https://www.dropbox.com/s/fisjxwn5zdrm71s/Example_EEG.png?dl=0" target="_blank">https://www.dropbox.com/s/fisjxwn5zdrm71s/Example_EEG.png?dl=0</a> )?</span><span lang=DA><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial",sans-serif;color:#002060'> </span><span lang=DA><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial",sans-serif;color:#002060'>Thanks in advance,</span><span lang=DA><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial",sans-serif;color:#002060'>Anderson</span><span lang=DA><o:p></o:p></span></p></div></div><p class=MsoNormal><span lang=DA>_______________________________________________<br>Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" target="_blank">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" target="_blank">eeglablist-unsubscribe@sccn.ucsd.edu</a><br>For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu" target="_blank">eeglablist-request@sccn.ucsd.edu</a><o:p></o:p></span></p></blockquote></div><p class=MsoNormal><span lang=DA><br clear=all><o:p></o:p></span></p><div><p class=MsoNormal><span lang=DA><o:p> </o:p></span></p></div><p class=MsoNormal><span lang=DA>-- <o:p></o:p></span></p><div><div><div><p class=MsoNormal><span lang=DA style='color:#888888'>_____________________________________________________</span><span lang=DA><o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=DA style='color:#888888'>Ramon Martinez-Cancino</span><span lang=DA><o:p></o:p></span></p></div><p class=MsoNormal><span lang=DA style='color:#888888'>Swartz Center for Computational Neuroscience<br>Institute for Neural Computation, University of California San Diego</span><span lang=DA><o:p></o:p></span></p></div></div></div></body></html>