matlab繪製多曲線對比圖
**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’);**