天天看点

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模板

继续阅读