Clear Filters
Clear Filters

plotting and joining scatter plots

2 views (last 30 days)
MOLE
MOLE on 1 Feb 2020
Answered: Walter Roberson on 1 Feb 2020
i have a vector x and y. i need to plot these points as solid circles and join them in order of indices by a line between each adjacent indices points. i also need to select the line size, line color and point color, how do i achieve this?

Answers (1)

Walter Roberson
Walter Roberson on 1 Feb 2020
Just call scatter() and then plot() passing in the same coordinates.
If it was not necessary that the point color be different from the line color then it could all be done with just a call to plot() with linestyle '-o' and appropriate options. However plot() does not permit the marker color to be different than the line color.

Products


Release

R2015a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!