matlab - Automatically plot different colored lines - Stack Overflow

matlab - Automatically plot different colored lines - Stack Overflow

瀏覽:1090
日期:2025-10-01
You could use a colormap such as HSV to generate a set of colors. For example: cc=hsv(12); figure; hold on; for i=1:12 plot([0 1],[0 i],'color',cc(i,:)); end MATLAB has 13 different named colormaps ('doc colormap' lists them all). Another option for plott...看更多