📄 createfigure.m
字号:
function createfigure(x1, y1)
%CREATEFIGURE(X1,Y1)
% X1: vector of x data
% Y1: matrix of y data
% Auto-generated by MATLAB on 09-Dec-2007 20:32:48
%% Create figure
figure1 = figure(...
'FileName','F:\博士论文\matlab程序\演示\fig5.fig',...
'PaperPosition',[0.6345 6.345 20.3 15.23],...
'PaperSize',[20.98 29.68]);
%% Create axes
axes1 = axes(...
'FontSize',11,...
'FontWeight','bold',...
'XGrid','on',...
'YGrid','on',...
'Parent',figure1);
xlim(axes1,[0 10]);
xlabel(axes1,'t/s');
ylabel(axes1,'y');
box(axes1,'on');
hold(axes1,'all');
%% Create multiple lines using matrix input to plot
plot1 = plot(x1,y1);
set(plot1(1),...
'LineStyle','--',...
'LineWidth',2);
set(plot1(2),'LineWidth',2);
%% Create legend
legend1 = legend(...
axes1,{'Logic','data2'},...
'FontSize',11,...
'FontWeight','bold');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -