x=-1:1; y=[1,2,3,4,5;1,2,1,2,1;5,4,3,2,1]; subplot(1,2,1);bar(x,y,'grouped'); title('Grouped');axis([-3,3,0,6]); subplot(1,2,2);barh(x,y,'stacked'); title('Stack');