How can a draw a line between two points?
Show older comments
I have a plot that looks like the one below. I want to make vertical lines that connect each individual pair of blue & red points. How can I do this?
PARTIAL CODE:
plot(x, average,'o', 'MarkerEdgeColor', 'b', 'MarkerFaceColor', 'b'); % Blue points
hold on
plot(x, average_2,'o', 'MarkerEdgeColor', 'r', 'MarkerFaceColor', 'r'); % Red points

Accepted Answer
More Answers (1)
Azzi Abdelmalek
on 3 Apr 2014
Edited: Azzi Abdelmalek
on 3 Apr 2014
plot(x, average,'-o', 'MarkerEdgeColor', 'b', 'MarkerFaceColor', 'b');
hold on
plot(x, average_2,'-o', 'MarkerEdgeColor', 'r', 'MarkerFaceColor', 'r');
hold off
Categories
Find more on Scatter Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!