MATLAB: Any way to plot scatter-line with different symbol

scatter-line with different symbol

is there anyway to draw a scatter-line figure with different symbol like below:
Thanks!
Yu

Best Answer

To reproduce that figure, try this:
x = 1:6;
y = 1:6;
figure
plot(x(1:4), y(1:4), '-ok', 'MarkerFaceColor','k')
hold on
plot(x(4:5), y(4:5), '-k')
plot(x(5:6), y(5:6), '-ok', 'MarkerFaceColor','w')
hold off
axis([0 7 0 7])
EDIT — Added plot image:
any way to plot scatter-line with different symbol - 2019 02 28.png
Experiment to get the result you want.