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
The easiest way, assuming you are using plot
, is to add the type of line in the command.
Some of the possible options are: --
,:
,-
,-.
. There also options for the marker type and for the width.
For example this code will generate several lines with different types of markers:
x = -pi:.1:pi;
y = sin(x);
z = cos(x);
t = tan(x);
l = x.^2;
figure();
hold on;
plot (x,y,'--g');
plot (x,z,'-.y');
plot (x,t,'-b');
plot (x,l,':r');
hold off;
the generated graph is:
for more help go to: http://www.mathworks.com/help/techdoc/ref/linespec.html