contourf(x,y,z);%等高线图
colormap(gray);设定图形颜色
scatter(x,y,'o');%绘制散点图
X=A(:,1); Y=A(:,2); Z=A(:,12);
[x,y,z]=griddata(X,Y,Z,linspace(min(X),max(X),200)',linspace(min(Y),max(Y),200),'v4');%利
用离散的地理坐标得到Zn的二元拟合连续函数,进行插值
mesh(x,y,z);shading flat%网格状的三维曲面图
surfl(x,y,z);shading flat%光滑的三维曲面图
colormap('')%设定曲面颜色
gray,winter,flag,cool..
%给图形家标注
title('') %图形标题
%二维的
gtext('标注内容','fontsize',15);%任意位置的标注
xlabel('..','',..,'',..);
ylabel('..','',..,'',..);
%三维图形的标注
text(x,y,z,'标注内容');
*****************画图多参数绘制************************
x=2000:2011;
predicted=a(1,:);
%plot(x,predicted, 'r-o');
plot(x,predicted,'ms-','linewidth',2,'MarkerEdgeColor','b','MarkerFaceColor','g');
legend('预测值','实际值');
xlabel('年份');ylabel('本专科在校生数(万人)');
hold on
plot(x,Goal,'bo-','linewidth',1,'MarkerEdgeColor','b','MarkerFaceColor','r');
legend('实际值');
*****************多实验对比图************************
plot(x1,a1,'--*','LineWidth',2);
hold on
plot(x1,b1,'-.o');
hold on
plot(x1,c1,'-^');
hold on
plot(x1,d1,':h');
%set(0,'defaultAxesFontName', 'Calibri')
%set(0,'defaultTextFontName', 'Calibri')
% set(gca,'FontSize',10, 'FontName','Calibri')
% xlabel('test','FontSize',10,'FontName','Calibri')
% ylabel('test','FontSize',10,'FontName','Calibri')
% legend('test','FontSize',10,'FontName','Calibri')
% title('','FontSize',13,'FontName','Calibri')
set(gca,'XTick',10:1:25);
grid on;
%set(gca,'FontName','Calibri');
xlabel('Time(Hour)');
ylabel('Nomalized cost of the Core layer ratio(%)');
%title('','FontName','Calibri');
legend 'NBS-based' 'Bandwidth minimization' 'Latency minimization' 'Random'
%legend('FontName','Calibri');