Tiled Layout Utilities: Dynamic Figure and Subplot Tools

Function set for easy management of tiled layouts. Automates grid setup and nested layouts in row/column order with custom spans.
5 Downloads
Updated 15 Jul 2025

View License

This MATLAB toolbox enhances tiledlayout functionality for building nested, multi-panel figures programmatically. Ideal for data visualization, reports, and scientific plotting where automatic tile placement saves time.
Key Functions:
  • setFig(figNum): Quick initialization of figure with a 1x1 tiled layout and activates the tile.
  • T=setFigT(figNum, subY, subX, varargin); Creates/selects a figure (hidden or full-screen options) with a subY x subX tiled grid. Saves multiple lines of code.
  • nexttileY(T, varargin); Drop‑in replacement for nexttile that walks down each column first (column‑major). No more manual tile indices when you want plots stacked vertically. Optional size span.
  • t=setTile(T, subY, subX, varargin); Add nested tiled‑layouts in whichever orientation you prefer, auto‑spanning tiles and keeping your code readable.
  • t=setTileY(T, subY, subX, varargin); Same as setTile but walks down each column first.
Functions track occupied tiles to avoid overlaps, based on MATLAB's graphics (R2019b+ required). No dependencies.
Example:
T = setFigT(1, 3, 2); % 3x2 grid
t1 = setTile(T, 2, 5, [1 2],'compact'); % Nested 2x5, spanning 1x2
for j =1:10
nexttile(t1); plot(j*[1:10]); ylim([0 100]);
title("nested tile")
end
ax = nexttileY(T); plot(sin(1:10)); % plots added in nearest tile ...
ax = nexttileY(T); plot(sin(1:10)); % in the vertical direction
sgtitle(T,"Entire Figure")

Cite As

Benjamin Tessler (2026). Tiled Layout Utilities: Dynamic Figure and Subplot Tools (https://au.mathworks.com/matlabcentral/fileexchange/181496-tiled-layout-utilities-dynamic-figure-and-subplot-tools), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2025a
Compatible with R2019b and later releases
Platform Compatibility
Windows macOS Linux
Version Published Release Notes
1.1.0

added a mlx demo, changed description a bit, changed the upload zip file name, changed the thumbnail image

1.0.0