plot lines and stems behind the markers?

21 views (last 30 days)
Sim
Sim on 21 Oct 2020
Commented: Sim on 21 Oct 2020
Hi, How can I put the plot lines and stems behind the markers?

Accepted Answer

Ameer Hamza
Ameer Hamza on 21 Oct 2020
You can use uistack(). For example, consider this code
x = 1:10;
y = rand(1,10);
hold on
s = scatter(x, y, 'filled', 'SizeData', 100);
p = plot(x, y, 'LineWidth', 2);
the line will be over the scatter points. You can bring the scatter point on top using
uistack(s, 'top')
  3 Comments

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!