How do I remove lines atached to each point in the STEM plot in MATLAB?
Show older comments
How do I remove lines atached to each point in the STEM plot in MATLAB? There are many lines together so I cannot see the points properly. Thanks.
Answers (2)
Mech Princess
on 9 Dec 2014
there are places easier to use stem than plot
stem(1:10,rand(10,1),'LineStyle','none'); %removes the line
Other options - change marker size, type, color, line style, size etc
Anand
on 15 Apr 2013
A stem plot is meant to have those vertical lines, that's why it is a 'stem'.
You could just use plot.
For example, instead of
stem(1:10,rand(10,1))
use
plot(1:10,rand(10,1),'o')
1 Comment
Mech Princess
on 27 Mar 2014
Thanks. I was stuck with stem and line plots. this works great
Categories
Find more on Stem 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!