for j= 1:numfiles;
plot(A(j,:))
legendmatrix{j,1}=strcat('Run',num2str(j))
hold all
end
legend(legendmatrix)
hold all allows me to have different colors for all my curves. However when I use the strings from strcat and display them on the plot, not enough colors are used and they are not assigned to the corresponding curve.
In this case plot 1 is run 1 in the legend, etc… and I want the colors to match
Here is a slightly different example:
Note that if N>7, the LINES colormap will start to repeat colors, but you can always specify your own set of colors… You also have the option of using different markers and line-styles to get more visually distinct data.