Displaying bar plots side by side

4 ビュー (過去 30 日間)
henry wang
henry wang 2011 年 2 月 4 日
Hi,
I want to use barh to display horizontal bar plot for 2 things. Hold on doesn't seem to work. How to do this? barh([1,2,3]) and barh([..]) I want the 2 things to be not overlayed but on top of one another in horizontal bar plot.
thanks, henry
  2 件のコメント
henry wang
henry wang 2011 年 2 月 4 日
Sorry I meant each value on top of one another. So at vertical scale 100, I first want to see 34, then another bar 48 underneathe it, if I issue the following command:
barh([10:10:100],[0.34.*([10:10:100])]) hold on barh([10:10:100],[0.48.*([10:10:100])])
it doesn't work.
Walter Roberson
Walter Roberson 2011 年 2 月 4 日
You want "stacked" bars?

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

回答 (2 件)

Walter Roberson
Walter Roberson 2011 年 2 月 4 日
Example:
barh([12:14],1:3);
hold on
barh([3/2 1 2]);

Walter Roberson
Walter Roberson 2011 年 2 月 5 日
Is the 'stacked' option of barh what you want?

カテゴリ

Help Center および File ExchangeGraphics Object Programming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by