Hi Iman,<div><br></div><div>topoplot() does not return the transformed electrode locations by default (it should, so we'll change that), but fortunately a very small modification to the function output will get what you want. Just edit topoplot.m and add variables 'x' and 'y' to the list of function outputs.</div>


<div><br></div><div>i.e. replace line 193 of topoplot.m with this line:</div><div><br></div>







<div><font color="#ff0000" face="courier new, monospace"><span>function</span> [<b><u>x</u></b>,<b><u>y</u></b>,handle,Zi,grid,Xi,Yi] = topoplot(Values,loc_file,varargin) </font></div><div><br></div><div>now call topoplot as follows:</div>


<div>







<p><font face="courier new, monospace">>> [x,y] = topoplot([],EEG.chanlocs,<span>'electrodes'</span>,<span>'on'</span>);</font></p><p>(note you can also use {'electrodes', 'labelpoint'} or other display options).</p>


<p>x and y now contain the x,y cartesian coordinates sorted in ascending order of channel number i.e. [ x(i) , y(i) ] are the x,y coordinates for the ith channel. The z-coordinate is the same for all channels and is hard-coded in topoplot.m to be <b>z=2.1</b>. </p>


<p>Try this scriptlet to test it out:</p><p><br></p><p><span style="font-family:'courier new',monospace"><font color="#93c47d">% ---------------------------------------------</font></span></p>
<p><span style="font-family:'courier new',monospace"><font color="#93c47d">% call topoplot and retrieve x,y,z electrode locations ...</font></span></p><p><span style="font-family:'courier new',monospace">figure; </span></p>


<p><span style="font-family:'courier new',monospace">[x,y] = topoplot([],EEG.chanlocs,</span><span style="font-family:'courier new',monospace">'electrodes'</span><span style="font-family:'courier new',monospace">,</span><span style="font-family:'courier new',monospace">'labelpoint'</span><span style="font-family:'courier new',monospace">);</span></p>


<p><font face="courier new, monospace">z = ones(size(x))*2.1;</font></p><p><font face="courier new, monospace" color="#6aa84f">% ... verify the locations by drawing markers </font><span style="color:rgb(106,168,79);font-family:'courier new',monospace">at the retrieved coordinates </span></p>


<p><font face="courier new, monospace" color="#6aa84f">%    (red markers should be exactly superimposed on original channel markers)</font></p><p><span style="font-family:'courier new',monospace">hold on; </span><span style="font-family:'courier new',monospace">plot3(y,x,z,</span><span style="font-family:'courier new',monospace">'.r'</span><span style="font-family:'courier new',monospace">);</span></p>


<p><span style="font-family:'courier new',monospace"><font color="#93c47d">% ---------------------------------------------</font></span><span style="font-family:'courier new',monospace"><br></span></p>
<p><br></p>







<p>Best,</p><p>Tim</p></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Dec 4, 2012 at 4:34 PM, Iman M.Rezazadeh <span dir="ltr"><<a href="mailto:irezazadeh@ucdavis.edu" target="_blank">irezazadeh@ucdavis.edu</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal">Dear EEGlabers.<u></u><u></u></p><p class="MsoNormal">


Do you have any idea how can I retrieve the  position of the electrodes on the displayed screen after using topoplot(). The point is when using topoplot() it needs the electrodes location and it has its own mapping to display it on the screen. Now, if sb wants to use the output of topoplot() as layout then the location of the electrodes on the screen is important!<u></u><u></u></p>


<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><span style="font-family:"Arial","sans-serif"">Iman M.Rezazadeh, PhD<u></u><u></u></span></p><p class="MsoNormal">


<span style="font-family:"Arial","sans-serif"">Postdoctoral Research Fellow<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:"Arial","sans-serif"">Center for Mind and Brain<u></u><u></u></span></p>


<p class="MsoNormal"><span style="font-family:"Arial","sans-serif"">University of California, Davis<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:"Arial","sans-serif""><a href="mailto:irezazadeh@ucdavis.edu" target="_blank">irezazadeh@ucdavis.edu</a><u></u><u></u></span></p>


<p class="MsoNormal"><span style="font-family:"Arial","sans-serif"">Cell:<a href="tel:310-490-1808" value="+13104901808" target="_blank">310-490-1808</a><u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:"Arial","sans-serif"">Skype: Imanmr<u></u><u></u></span></p>


<p class="MsoNormal"><u></u> <u></u></p></div></div><br>_______________________________________________<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><br></blockquote></div><br><br clear="all">

<div><br></div>
-- <br>---------  įķōßėēųē -----------<br>
</div>