Try this —
x1 = 1:10;
y1 = rand(size(x1));
x2 = 5:15;
y2 = rand(size(x2))+0.5;
figure
scatter(x1, y1, 50, 'dr', 'filled')
hold on
scatter(x2, y2, 50, 'sg', 'filled')
hold off
grid
legend('(x_1, y_1)','(x_2, y_2)', 'Location','best')
Experiment!
.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!