Hi, I want to plot 31 curves with varying colors and styles. My code is as follows:
colorspec = colormap(jet(8));set(groot,'defaultAxesColorOrder',colorspec,'defaultAxesLineStyleOrder','-|--|:|-.');for k1 = 1:31 semilogx(All_112(:,1), All_112(:,k1+1), 'Linewidth',2); legendInfo{k1} = ['Day = ' num2str(k1)]; hold allendlegend(legendInfo);
I am getting all the curves but Matlab plots one style first with all the 8 colors and then goes to the next. Is there any way to modify the code such that Matlab uses each color in the ColorOrder with all the line styles in LineStyleOrder and then jumps to the next color?
Thanks.
Best Answer