天天看點

MATLAB 作圖SCI模闆MATLAB 作圖SCI模闆

MATLAB 作圖SCI模闆

MATLAB作圖概述

在不進行特定設定時,matlab畫出的圖是很難滿足大多數期刊的要求的。其中關鍵的問題在于作圖的尺寸,圖中線條的配色,與導出圖檔的分辨率等原因。

MATLAB模闆作圖

簡單示例

% Test 1
PPP = 0; % 給定顔色初始值
x = 0:pi/100:2*pi;
y = sin(x);
plt = plot(x,y);
Picture_LCF;
           
MATLAB 作圖SCI模闆MATLAB 作圖SCI模闆

複雜示例

% Test2
PPP = 0;
>> subplot(211)
x = 0:pi/100:2*pi;
y = sin(x);
plt = plot(x,y);
Picture_LCF;
subplot(212)
x = 0:pi/100:2*pi;
y = sin(2*x);
plt = plot(x,y);
Picture_LCF;
           
MATLAB 作圖SCI模闆MATLAB 作圖SCI模闆

模闆程式

将模闆程式命名為 Picture_LCF.m

Picture_LCF
% =========================================================================
% =                                                                       =
% =             Demo of Plot Picture by Matlab                            =
% =                             by                                        =
% =                          Chuanfeng Li                                 =
% =                       date: 02.03.2020                                =
% =                                                                       =
% =                               HIT                                     =
% =                   e-mail: [email protected]                          =

% Picture Beautiful
% Picture_LCF
PPP = PPP+1;
switch PPP
    case {1}
    plt.Color = [0.6350 0.0780 0.1840];
    case {2}
    plt.Color = [0 0.4470 0.7410];
    case {3}
    plt.Color = [0.4660 0.6740 0.1880];
    otherwise
    plt.Color = [0.3010 0.7450 0.9330];
end
% plt.Color = [0.4660 0.6740 0.1880];                                      % set the color of picture
plt.LineWidth = 1.8000;                                                    % set the linewidth of picture
plt.MarkerSize = 10;                                                       % set the markersize of picture
plt.Marker = 'none';                                                          % 設定線條形狀
set(gca,'FontSize',15);


% ylabel('Amplititude','FontSize',15,'LineWidth',8)                        % set the label of  y axis                 
xlabel('Time(s)','FontSize',15,'LineWidth',8)                              % set the label of  x axis 
set(gca,'FontName','Helvetica');                                           %設定所有字型大小為18号,字型為Helverica
set(gca,'linewidth',1.5);                                                  %設定圖框的線寬1.5
set(gcf,'position',[0 0 650 450]);                                         %設定畫幅大小為橫650*縱450
% set(gca,'XLim',[0,0.02])                                                 %設定y軸的範圍
% set(gca,'xticklabel',{'0.0','0.005','0.01','0.015','0.02'});             %設定x軸的label
% set(gca,'yticklabel',{'1.0','1.5','2.0','2.5','3.0','3.5'});             %設定y軸的label
% set(gca,'ytick',0:100:2500)
grid on                                                                    %設定網格線                                   





           

MATLAB示例作圖

% 正常的matlab 畫圖語句
x = 0:pi/100:2*pi;
y = sin(x);
plot(x,y)
           
MATLAB 作圖SCI模闆MATLAB 作圖SCI模闆
% 正常的matlab 畫圖語句
subplot(211)
x = 0:pi/100:2*pi;
y = sin(x);
plot(x,y);
subplot(212)
x = 0:pi/100:2*pi;
y = sin(2*x);
plot(x,y);
           
MATLAB 作圖SCI模闆MATLAB 作圖SCI模闆

繼續閱讀