tightly_SubPlot

版本 1.0.2 (1.4 KB) 作者: yu shi
note : manual by user to adjust axis size and position of subplot to plot figure tightly
59.0 次下载
更新时间 2020/8/23

查看许可证

function tightly_SubPlot(m,n,scale,edge,name,type)
% m as row num
% n as col num
% scale as axis size of each subplot, use to adjust distance between subplot
% edge as the distance from the coordinate axis from subplot [m row,1st col] to the
% lower and left
% name use for save figure
% type as formate of figure
% ShiYu 2020-8-21
% note : manual by user to adjust axis size and position of subplot
if nargin == 5
type = 'pdf';
elseif nargin == 4
type = 'pdf';
name='sample';
elseif nargin == 3
type = 'pdf';
name='sample';
edge=0.05;
elseif nargin == 2
type = 'pdf';
name='sample';
edge=0.05;
scale=0.7;
end
figure('Color',[1 1 1]);
X_length=1-edge;
Y_length=1-edge;
xsize=X_length/n;
ysize=Y_length/m;
for x=1:m
for y=1:n
h=axes('Position',[xsize*(y-1)+edge 1-ysize*x scale*xsize scale*ysize]);
end
end
saveas(gca,name,type);
end

引用格式

yu shi (2026). tightly_SubPlot (https://ww2.mathworks.cn/matlabcentral/fileexchange/79391-tightly_subplot), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2014a
兼容任何版本
平台兼容性
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.2

some correct of note

1.0.1

new example figure

1.0.0