📄 sp_fig.m
字号:
function sp_fig(N,width,height)
% sp_fig(N,width,height)
% Creates figure N in lower right corner of screen.
% Width and height are in inches. If they are omitted,
% they are set to 7 x 4.5, respectively.
figure(N);
% Set the figure size and position.
clf;
set(0,'units','inches');
ss=get(0,'screensize');
set(0,'units','pixels');
set(gcf,'units','inches');
if nargin < 3,
width=9;
height=6;
end
% Scale the width and height for my computer.
scale=5/5.69;
width=scale*width;
height=scale*height;
set(gcf,'position',[.1*ss(3),.06*ss(4),width,height]);
% If width & height are specified, set the axes for 12-pt. labels.
if nargin >= 3,
set(gca,'units','inches');
x1=.75; x2=.2; % x margins
y1=.6; y2=.4; % y margins
set(gca,'position',[x1,y1,width-x1-x2,height-y1-y2]);
set(gca,'units','normalized');
end
set(gcf,'units','pixels');
set(gcf,'color',[1 1 1]);
set(gcf,'defaultaxesfontname','times');
set(gcf,'defaultaxesfontsize',10);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -