Plotyy with bars stacked

4 ビュー (過去 30 日間)
Giorgos Papakonstantinou
Giorgos Papakonstantinou 2013 年 6 月 4 日
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 件)

カテゴリ

Help Center および File ExchangeTwo y-axis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by