How to plot multiple lines with different markers

后端 未结 6 1867
感情败类
感情败类 2021-02-03 12:27

I would like to plot multiple lines with MATLAB and do it so, that markers would be different in every line. I know that with colours this would be achieved with ColorSet

6条回答
  •  我在风中等你
    2021-02-03 13:03

    x = linspace(0, 2*pi);
    y = cos(bsxfun(@plus, x(1:15:end), x'));
    figure
    m = {'+','o','*','.','x','s','d','^','v','>','<','p','h'};
    set(gca(), 'LineStyleOrder',m, 'ColorOrder',[0 0 0], 'NextPlot','replacechildren')
    plot(x, y)
    

提交回复
热议问题