
plot(t,tiao2,'linewidth',3)
set(h2,'yaxislocation','right','color','none','xticklabel',[])
实例 8 :区域图形
function shili08
h0=figure('toolbar','none',...
'position',[200 150 450 250],...
'name',' 实例 08');
x=91:95;
profits1=[88 75 84 93 77];
profits2=[51 64 54 56 68];
profits3=[42 54 34 25 24];
profits4=[26 38 18 15 4];
area(x,profits1,'facecolor',[0.5 0.9 0.6],...
'edgecolor','b',...
'linewidth',3)
hold on
area(x,profits2,'facecolor',[0.9 0.85 0.7],...
'edgecolor','y',...
'linewidth',3)
hold on
area(x,profits3,'facecolor',[0.3 0.6 0.7],...
'edgecolor','r',...
'linewidth',3)
hold on
area(x,profits4,'facecolor',[0.6 0.5 0.9],...
'edgecolor','m',...
'linewidth',3)
hold off
set(gca,'xtick',[91:95])
set(gca,'layer','top')
gtext('\leftarrow 第一季度销量 ')
gtext('\leftarrow 第二季度销量 ')
gtext('\leftarrow 第三季度销量 ')
gtext('\leftarrow 第四季度销量 ')
xlabel(' 年 ','fontsize',16);
ylabel(' 销售量 ','fontsize',16);
实例 9 :饼图的绘制
function shili09
h0=figure('toolbar','none',...
'position',[200 150 450 250],...
'name',' 实例 09');
t=[54 21 35;
评论0