[Eeglablist] Same colors on ERP plots
Tim Mullen
mullen.tim at gmail.com
Fri Aug 3 13:09:12 PDT 2012
If the ERP waveforms are the only line objects in that axis the automated
solution is simple:
% ---------------------------
% First make sure the axis containing lines has focus by e.g. clicking on it
% Also check the 'tag' property of the axis -- if it has a unique tag you
can use findobj() to grab its handle automatically.
% 1) get the handle to current axis containing lines:
axhandle = gca;
% 2) get the handles of the lines
lines = findobj(axhandle,'type','line');
% 3) define a color scheme. Also check out distinguishable_colors() from
Matlab FEX
colors = hsv(length(lines));
% 4) recolor the lines
for k=1:length(lines)
set(lines(k),'color',colors(k,:));
end
% ---------------------------
- Tim
On Fri, Aug 3, 2012 at 12:27 PM, Makoto Miyakoshi <mmiyakoshi at ucsd.edu>wrote:
> Dear Mirek,
>
> It's just a symptomatic treatment, but let me tell you this anyway.
> Better than nothing.
> You can double click each line to open a figure editor, and you can
> assign colors you like. It would also tell you which line is data1,
> data2,... if you know your data plot order, you should be able to
> identify which one is which.
>
> Makoto
>
> 2012/8/3 mirek <3mirek at gmail.com>:
> > Hello, everybody!
> >
> > I have a study design based on 5x2 factors. Unfortunately, when plotting
> > the results, the colors of ERP waveform are duplicated. So each two
> > consecutive lines are indistinguishable.
> > The example is here:
> > http://zpf.psychologia.uj.edu.pl/hidden/samecolors.png
> > Any suggestion how to change it?
> >
> > Best,
> >
> > Mirek Wyczesany
> > _______________________________________________
> > Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> > To unsubscribe, send an empty email to
> eeglablist-unsubscribe at sccn.ucsd.edu
> > For digest mode, send an email with the subject "set digest mime" to
> eeglablist-request at sccn.ucsd.edu
>
>
>
> --
> Makoto Miyakoshi
> JSPS Postdoctral Fellow for Research Abroad
> Swartz Center for Computational Neuroscience
> Institute for Neural Computation, University of California San Diego
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to
> eeglablist-unsubscribe at sccn.ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to
> eeglablist-request at sccn.ucsd.edu
>
--
--------- αντίληψη -----------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20120803/23865bb7/attachment.html>
More information about the eeglablist
mailing list