<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Thank you Makoto. I have found some helpful approaches used in James Desjardin's very nice VisEd-marks plugin, and have contacted him directly about some additional details. Best regards, Stuart <br><br><span style="background-color: rgba(255, 255, 255, 0);">==<br>Stuart Fogel, PhD</span><div><span style="background-color: rgba(255, 255, 255, 0);">Adjunct Professor & Research Scientist <br>The Brain & Mind Institute | Department of Psychology</span><div><span style="background-color: rgba(255, 255, 255, 0);">Western University | London | Ontario | Canada<br><a href="http://www.BMIsleeplab.uwo.ca">www.BMIsleeplab.uwo.ca</a></span></div><div><div><span style="background-color: rgba(255, 255, 255, 0);">==</span></div></div></div></div><div><br>On Aug 11, 2014, at 3:38 PM, Makoto Miyakoshi <<a href="mailto:mmiyakoshi@ucsd.edu">mmiyakoshi@ucsd.edu</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">Dear Stuart,<div><br></div><div>I don't touch EEGLAB interactive plot, but I know the expert. Please check out VisEd by James Desjardins. In his code you should be able to find the solution for your question (or the plugin itself could solve your issue).</div>


<div><a href="https://www.youtube.com/watch?v=M-BlkI3NbiM" target="_blank">https://www.youtube.com/watch?v=M-BlkI3NbiM</a><br></div><div><br></div><div>Makoto</div><div class="gmail_extra"><br><br><div class="gmail_quote">

On Tue, Aug 5, 2014 at 9:15 PM, Stuart Fogel <span dir="ltr"><<a href="mailto:sfogel@uwo.ca" target="_blank">sfogel@uwo.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello eeglab-ers,<br>
<br>
I'm trying to gather information about the latency for when the mouse button is ctrl-clicked and ctrl-released from eegplot to be used in some additional code to manipulate the EEG.events structure. According to the eegplot documentation, it seems the best way to get this info is using the ctrlselectcommand option when calling eegplot.<br>



<br>
However, I have been running into some trouble figuring out where this information is accessible. I read on the eeglablist that it is in the UserData for the plot, but I have not been able to successfully track it down.<br>



<br>
This little bit of code retrieves a whole bunch of info about eegplot, but it seems not what I am looking for (unless it's well hidden). Here's what I have so far:<br>
<br>
% Get latency on mouse click and mouse release:<br>
ctrlselectcommand = {'lat1=get(gcbf,''UserData''),' ','lat2=get(gcbf,''UserData'');<br>
<br>
% call eegplot with options<br>
chaninds=[1:length(EEG.chanlocs)];<br>
eegplot( EEG.data(chaninds,:,:), ...<br>
        'eloc_file',EEG.chanlocs(chaninds), ... ...<br>
        'srate', EEG.srate, ...<br>
        'limits', [EEG.xmin EEG.xmax]*1000 , ...<br>
        'command', command, ...<br>
        'ctrlselectcommand', ctrlselectcommand, ...<br>
        'events',EEG.event);<br>
<br>
Any help on some code snippets or advice on how to retrieve this info would be greatly appreciated!<br>
<br>
I also ran into a second issue, which is resolved but only by modifying the code for eegplot.m.  I ran into some trouble getting eegplot to play nicely with the ctrselectcommand option. I slightly modified the code at ~line 1031 of eegplot.m to following, as I could not figure out another way around the issue. I'm not sure if it's a bug, or if I've handled the ctrlselectcommand option clumsily in the first place. In case this is a bug, here's the changes I made to to eegplot.m:<br>



<br>
g.commandselect{1} = [ 'if strcmp(get(gcbf, ''SelectionType''),''alt''),' g.ctrlselectcommand{1,1}{1,1} ...<br>
                         ',else '                                           g.selectcommand{1} ',end;' ];<br>
g.commandselect{2} = [ 'if strcmp(get(gcbf, ''SelectionType''),''alt''),' g.ctrlselectcommand{1,1}{1,2} ...<br>
                         ',else '                                           g.selectcommand{2} ',end;' ];<br>
g.commandselect{3} = [ 'if strcmp(get(gcbf, ''SelectionType''),''alt''),' g.ctrlselectcommand{1,1}{1,3} ...<br>
                         ',else '<br>
<br>
Thanks,<br>
Stuart<br>
<br>
==<br>
Stuart Fogel | PhD<br>
Adjunct Professor & Research Scientist<br>
Brain & Mind Institute | Department of Psychology<br>
Western University | London | Ontario | Canada<br>
<a href="http://www.BMIsleeplab.uwo.ca" target="_blank">http://www.BMIsleeplab.uwo.ca</a><br>
==<br>
<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><div dir="ltr">Makoto Miyakoshi<br>Swartz Center for Computational Neuroscience<br>Institute for Neural Computation, University of California San Diego<br></div>



</div></div>
</div></blockquote></body></html>