Plotyy with bars stacked
4 ビュー (過去 30 日間)
古いコメントを表示
I am trying to do a matlab plot with two y axes. I want both to plots to be of type 'bars'. I can't work out how to make them stacked an how to hace axes going from 1:3 with out overlapping each other.
Here's what I do.
y = {rand(x, 1) * 100; (-0:(0.8)/(x-1):0.8)'};
fn1=@(x,y) bar(x , y, 0.3, 'FaceColor','r');
fn2=@(x,y) bar(x , y, 0.3, 'FaceColor','b');
[ax, hbar1, hbar2]=plotyy(1:2:6, y{1},2:2:6,y{2} ,fn1,fn2);
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Two y-axis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!