how to plot multiple discrete values in stem plot using line segment

I got the i=[4 5 5 6] and similarly p=[4 5 7 8] .I got both i and p values in y axis. and in x axis i got [8 10 12 14 ] how can i use stem plot for this case .is there ant possibility

回答 (1 件)

Daniel Shub
Daniel Shub 2012 年 3 月 5 日

0 投票

What about something like:
errorbar(x, i+diff([i;p])/2, diff([i;p])/2, diff([i;p])/2)

3 件のコメント

mohan gopal
mohan gopal 2012 年 3 月 27 日
i have this but the output doesn't seem to be perfect. pls say me whether this is impicable as we can specify stem(8,4,4) similarly stem(10,5,5)....so on
Daniel Shub
Daniel Shub 2012 年 3 月 27 日
What isn't perfect? I am not sure what "impicable" means. The syntax stem(8,4,4) is not valid.
Matt Tearle
Matt Tearle 2012 年 3 月 27 日
"impossible", perhaps?
Anyway, you can do stem(x,[i',p']), you could also do a hold and set various properties of each stem plot -- the doc has a number of nice examples. Perhaps you could give us some idea of what you want the resulting plot to look like?

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeData Distribution Plots についてさらに検索

製品

タグ

質問済み:

2012 年 3 月 5 日

Community Treasure Hunt

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

Start Hunting!

Translated by