例子:同時作三幅直方圖
x1=[1 2 3];
y1=[3 2 3];
x2=[4 5 6];
y2=[5 6 5];
x3=[7 8 9];
y3=[6 7 8];
figure
bar(x1,y1);
set(gca,'XTicklabel',{'1月','2月','3月'});
title('圖1');
xlabel('第1季度');
ylabel('銷售量');
figure
bar(x2,y2);
set(gca,'XTicklabel',{'4月','5月','6月'});
title('圖2');
xlabel('第2季度');
ylabel('銷售量');
figure
bar(x3,y3);
set(gca,'XTicklabel',{'7月','8月','9月'});
title('圖3');
xlabel('第3季度');
ylabel('銷售量');
%不需要使用hold on 和 hold off



