Choose the colormap you want, and specify the number of levels you want.
For example:
cmap = colormap(parula(10));
then for the 7th plot, you might call plot as:
hold on
for k1 = 1:10
plot([1:10], randi(k1*5, 1, 10), 'Color',cmap(k1,:))
end
hold off
grid
You can also set the 'AxisColorOrder' and 'AxisLineStyleOrder' by default or for each axis (this example taken from another post):
set(0,'defaultaxescolororder',[0 0 0; 0.5 0.5 0.5])
set(0,'defaultaxeslinestyleorder',{'-*',':','o'})
In R2014b and later, replace the ‘0’ with groot.
Best Answer