Commit 4c9eb300 authored by James Desjardins's avatar James Desjardins
Browse files

fix interacting with chan/comp_info marks in ve_eegplot

parent b4e5814a
......@@ -1205,18 +1205,22 @@ else
figdim=axis;
tag_x_int=figdim(2)*g.inter_tag_int;
% plot channels whose order is < 0.
manual_mark_ind=find(strcmp('manual',{g.chan_marks_struct.label}));
mark_inds=find([g.chan_marks_struct.order]<0);
n_mark_inds=length(mark_inds);
for fi=1:n_mark_inds;
chan_inds=find(g.chan_marks_struct(mark_inds(n_mark_inds-(fi-1))).flags);
tmp_color=g.chan_marks_struct(mark_inds(n_mark_inds-(fi-1))).line_color;
tmp_color=[.7 .7 .7];
if strcmp(g.plotdata2, 'on') && length(g.color) == 2
tmp_color=g.color{2};
chan_inds=find(g.chan_marks_struct(mark_inds(fi)).flags);
tmp_color=g.chan_marks_struct(mark_inds(fi)).line_color;
if strcmp(g.plotdata2, 'on');
if length(g.color)==2;
tmp_color=g.color{2};
else
tmp_color=[.7 .7 .7];
end
end
plot_p1 = 1+tag_x_int*mark_inds(n_mark_inds-(fi-1));
plot_p2 = (g.chans-(chan_inds-1))*g.spacing;
plot_colour = g.chan_marks_struct(mark_inds(n_mark_inds-(fi-1))).tag_color;
plot_colour = g.chan_marks_struct(mark_inds(fi)).tag_color;
for ci=1:length(chan_inds);
%plot tick...
plot(plot_p1, plot_p2(ci),'<', ...
......@@ -1224,10 +1228,12 @@ else
'MarkerFaceColor', plot_colour, ...
'MarkerSize', 8);
%plot data
tmp_offset=(g.chans-(chan_inds(ci)-1))*g.spacing-(meandata(chan_inds(ci)));
line(1:length(low_high_range), ...
data(chan_inds(ci),low_high_range) + tmp_offset, zlowhigh, ...
'color', tmp_color, 'clipping','on');
if fi==manual_mark_ind || ~g.chan_marks_struct(manual_mark_ind).flags(chan_inds(ci));
tmp_offset=(g.chans-(chan_inds(ci)-1))*g.spacing-(meandata(chan_inds(ci)));
line(1:length(low_high_range), ...
data(chan_inds(ci),low_high_range) + tmp_offset, zlowhigh, ...
'color', tmp_color, 'clipping','on');
end
end
end
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment