[Eeglablist] Same colors on ERP plots
mirek
3mirek at gmail.com
Sat Aug 4 03:11:10 PDT 2012
Ok, more investigation:
When choosing study design 5x1 - the colors are pretty distinct so it's ok.
I went back to the problematic 5x2 design and checked Tim's script. It
changes but still replicates the colors despite colors(k,:) has
different value in each row.
I tried to remove properties with the following code:
hlink = getappdata(gca,'graphics_linkprop')
removeprop(hlink,'color')
but there's sth wrong with the second line of the code.
When plotting 5x2 there are two plots each with 5 lines and
length(lines) equals 10
So I modified the script and now it assigns the same colors for the
lines with the same conditions in both plots.
I'm not sure why it works while the original does not.
Unfortunately, the plot has to be picked up manually to get the proper
axis handle, so I have to run in twice.
axhandle = gca;
lines = findobj(axhandle,'type','line');
plots = size(STUDY.design(STUDY.currentdesign,1).variable(1,2).value,2);
colors = hsv(length(lines)/factors);
for f = 0:factors-1 %factors
for k = 1 + f*length(lines)/plots : (1+f)*length(lines)/plots
set(lines(k),'color',colors(k-f*length(lines)/plots,:));
end
end
The plots are made using GUI's Study > Plot channel measures > Plot ERPs.
Moreover, when two or mole electrodes are chosen for plot in this 5x2
design - the problem disappears. So it's probably specific only to two
variable designs and one electrode plot.
--
Mirek Wyczesany
Jagiellonian University
Psychophysiology Lab
Kraków, PL
More information about the eeglablist
mailing list