Tiled Layout Utilities: Dynamic Figure and Subplot Tools
Versión 1.1.0 (51 KB) por
Benjamin Tessler
Function set for easy management of tiled layouts. Automates grid setup and nested layouts in row/column order with custom spans.
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")
Citar como
Benjamin Tessler (2026). Tiled Layout Utilities: Dynamic Figure and Subplot Tools (https://la.mathworks.com/matlabcentral/fileexchange/181496-tiled-layout-utilities-dynamic-figure-and-subplot-tools), MATLAB Central File Exchange. Recuperado .
Compatibilidad con la versión de MATLAB
Se creó con
R2025a
Compatible con cualquier versión desde R2019b
Compatibilidad con las plataformas
Windows macOS LinuxEtiquetas
Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.