Grids of tiled chart layouts

A tool for simplifying the creation of nested tiled layouts

You are now following this Submission

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

Cite As

Matt J (2026). Grids of tiled chart layouts (https://www.mathworks.com/matlabcentral/fileexchange/161736-grids-of-tiled-chart-layouts), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
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