MATLAB: How to get the pre-2014b behavior of hold on

2014bgraphicsMATLABr2014bgraphics

I often make 2-d plots showing a comparison of cases with a parameter 'On" of 'Off'. So I'll have several curves for the first case and then another set, using dashed lines, for the second case.
%The code would be pre 2014b
plot(x,y_on)
hold on
plot(x,y_off,'--')
How can I get the same result in 2014b?

Best Answer

I use
set(gca, 'ColorOrderIndex', 1)
between calls to reset the color order, and give you the same behavior as pre-2014b