How to plot multiple lines with different markers

后端 未结 6 1651
感情败类
感情败类 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:14

    Well, I am not aware of a built-in functionality of MATLAB to do so, but I do the following. I create my own cell:

    markers = {'+','o','*','.','x','s','d','^','v','>','<','p','h'}
    

    and then access it this way:

    markers{mod(i,numel(markers))+1}
    

    I also created a function, getMarker, that does that and that I added to the path of MATLAB so that I can access it in all my scripts.

提交回复
热议问题