%% bar bar3 竖直 bar( ,'style') group 默认,stack 堆叠 Income=[0.5,0.7,0.8;0.7,0.8,0.4;0.4,0.3,0.9;0.3,0.6,0.9;0.2,0.1,0.6]; subplot(221) bar(Income,'group');title('group') subplot(222) bar(Income,'stack');title('stack') %第二个的高度=第一个数+第二个数 subplot(223) barh(Income,'stack');title('stack') subplot(224) bar(Income,1);title('Width=1') % 比较第一张图,width=1时,条形之间没有间距