In 2013 and earlier I could do this to compare multi-line plots:
% make up some data
X1 = rand(5,3); X2 = X1+rand(5,3)*0.1; plot(X1); % draw dataset 1
hold on; plot(X2,':'); % compare with corresponding dataset 2
hold off;
This is broken in matlab 2014: the second set of lines colours don't match up with the first set.
I guess this is because the axes keep track of the colororder index when hold is on.
How can I reset the colororder index so that subsequent plots restart with color 1, as in previous matlabs? I'd really rather not have to go through a for loop to draw each of the lines!
Best Answer