圖表一致,真是快被搞瘋了

乾脆全部圖表全都用Matlab畫

以下是這次用到的設定座標值、範圍、圖表的文字設定、線圖顏色、粗細,圖例

參考資料:MATLAB 之工程應用9.3.6增加標題與文字

MathWorks_plot

plot(psel(:,1), 'Color', [0.3 0.5 0.9],'LineWidth',5); hold on; 藍
plot(psel(:,2), 'Color', [0.8 0.5 0.5],'LineWidth',5); hold on; 紅
plot(psel(:,3), 'Color', [0.5 0.8 0.3],'LineWidth',5); 綠

以上將資料以三種顏色作區分畫曲線

Color 設定顏色,RGB介在[0,1]之間

LineWidth 設定曲線寬度

set(gca, 'YGrid','on');

顯示Y軸格線,若XY軸格線都要顯示則 grid on; 即可

set(gca,'XTick',1:1:19);

設定X軸範圍,上述為1到19,間隔為1

set(gca,'XTickLabel',{'k0';'k1';'k2';'k3';'k4';'k5';'k6';'k7';'k8';'k9';'k10';'k11';'k12';'k13';'pt_6';'pt_7';'pt_8';'pt_9';'pt_10'})

set(gca,'YTickLabel',{'3.00%';'3.20%';'3.40%';'3.60%';'3.80%';'4.00%';'4.20%';'4.40%'})

設定XY label

set(gca,'FontSize',20)

設定XY label 的字型大小

xlabel('kernel set','fontweight','bold', 'fontsize', 36);

ylabel('PSEL(3)','fontweight','bold', 'fontsize', 36);

設定XY 軸標題 的粗體、字型大小

hleg1 = legend('SMO-MKSVR','AW-MKSVR','EW-MKSVR');

set(hleg1, 'fontsize', 36);

設定圖例與其字型大小

arrow
arrow
    全站熱搜

    glitterHsin 發表在 痞客邦 留言(0) 人氣()