Grids of tiled chart layouts

版本 1.1.3 (1.4 KB) 作者: Matt J
A tool for simplifying the creation of nested tiled layouts
6.0 次下载
更新时间 2024/3/28

查看许可证

Very often, I see people with plotting tasks that can be accomplished with a nesting of tiled chart layouts, but the syntax required for this can seem somewhat acrobatic. I've therefore created this submission to simplify the creation of (outer) tiled layouts whose tiles contain smaller (inner) tiled layouts.
What it does is let you specify the dimensions and nesting structure of the layouts in advance. It will then set-up the layout with empty axes, adn return handles to the axes and to the inner and outer layouts.You can then just loop over the axes handles with either 1D or 4D indexing and populate the axes with their actual intended contents. Furthermore, the tiled layout handles provided by the code let you add shared elements like legends and axis labels.
Example: A 3x1 set of tiles each containing a 2x6 tiled layout
[ax,t,T]=nestedLayouts([3,1],[2,6]);
for i=1:numel(ax) %populate all 24 axes with plot data
plot(ax(i),rand(1,5));
end
for i=1:numel(t) %Give each outer tile its own ylabel
ylabel(t(i),"ylabel No. "+i);
end
sgtitle(T, "Tiled Layout") %Global Title

引用格式

Matt J (2024). Grids of tiled chart layouts (https://www.mathworks.com/matlabcentral/fileexchange/161736-grids-of-tiled-chart-layouts), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2021b
兼容任何版本
平台兼容性
Windows macOS Linux
标签 添加标签

Community Treasure Hunt

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

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

Bug fix. Axes handles were in the wrong order

1.0.3

Title update

1.0.2

Title change

1.0.1

Description update.

1.0.0