Making complex(ish) bar graphs?
1 回表示 (過去 30 日間)
古いコメントを表示
Second question of the day, I have a single set of values on the y axis (in this case lengths from 10-20 "units), and then I have 4 different items I want on the x axis (preferably in different colors), and I want them to be grouped in pairs (for easy comparison). How would I go about doing this?
0 件のコメント
回答 (1 件)
Grzegorz Knor
2011 年 9 月 20 日
Something like this:
y = rand(4,1)*10+10;
bar([1,2],y(1:2),'r')
hold on
bar([3.5,4.5],y(3:4),'g')
set(gca,'xtick',[1 2 3.5 4.5],'xticklabel',{'A','B','C','D'})
ylabel('length [a.u.]')
?
See also:
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!