Adding Vertical Lines to all Points on Plot

18 ビュー (過去 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 Center および File ExchangeScatter Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by