分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.youkuaiyun.com/jiangjunshow
也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!
使用subplot(row, col, i)创建的子图,matlab会隐式地调整它们的间距以及它们和整个figure的边距,以达到它所认为的美观或者合理的设置,然而如果我们想根据需求设置合理的间距以及边距,该怎么定制呢?
这里提供一个函数(是在没必要把时间花费在这种繁琐的格式上):
function ha = tight_subplot(Nh, Nw, gap, marg_h, marg_w)% tight_subplot creates "subplot" axes with adjustable gaps and margins%% ha = tight_subplot(Nh, Nw, gap, marg_h, marg_w)%% in: Nh number of axes in hight (vertical direction)% Nw number of axes in width (horizontaldirection)% gap gaps between the axes in normalized units (0...1)% or [gap_h gap_w] for different gaps in height and width % marg_h margins in height in normalized units (0...1)% or [lower upper] for different lower and upper margins %&n

本文介绍了如何在MATLAB中定制子图的间距和边界,提供了函数tight_subplot的用法,用于调整行数、列数、子图间间隔以及图像到figure边界的距离。示例中展示了如何应用该函数,并提到了对于imshow()显示图像的情况同样适用。此外,还提及了相关参考资料。
最低0.47元/天 解锁文章

3767

被折叠的 条评论
为什么被折叠?



