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
Yes, there's a ready made method: it's the LineStyleOrder axis property. To activate it you have to disable the ColorOrder property, which takes precedence over the former and is activated by default. You can do as follows:
m = {'+','o','*','.','x','s','d','^','v','>','<','p','h'};
set_marker_order = @() set(gca(), ...
'LineStyleOrder',m, 'ColorOrder',[0 0 0], ...
'NextPlot','replacechildren');
where the m
values were obtained manually from the output of help plot
.
Then use it as in this example:
x = linspace(0, 2*pi);
y = cos(bsxfun(@plus, x(1:15:end), x'));
figure
set_marker_order()
plot(x, y)