Adding Vertical Lines to all Points on Plot

조회 수: 41 (최근 30일)
Ziv Melamed
Ziv Melamed 2018년 12월 6일
댓글: Star Strider 2018년 12월 6일
I want to keep my question as simple and to the point as possible. I have a scatter plot that marks points (ex: T=[5 10 100 1000 10000]; I want to add a vertical line for each point marked on the plot but I do not want to add each line manually. Is there a line function I can use to have it put a vertical line from each of my "T" points on the scatter plot?

채택된 답변

Star Strider
Star Strider 2018년 12월 6일
See if any of these do what you want:
T=[5 10 100 1000 10000];
figure
stem(T, 'filled')
grid
figure
stem(T, ones(size(T)))
grid
figure
stem(T, 'Marker','none')
grid
  댓글 수: 2
Ziv Melamed
Ziv Melamed 2018년 12월 6일
That worked! Thanks!
Star Strider
Star Strider 2018년 12월 6일
As always, my pleasure!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Scatter Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by