nested_tiledlayout: Multi-Level Tiled Layouts in MATLAB

Versión 1.0.2 (6,86 KB) por Fumiya
Easily create and manage nested tiledlayouts with smart defaults and intuitive control over titles, labels, legends, and more.
34 Descargas
Actualizado 3 abr 2025

Ver licencia

Overview
nested_tiledlayout is a lightweight and intuitive class designed to simplify the creation and management of nested tiledlayout figures in MATLAB—no matter how many layers deep.
Key Features
  • Effortlessly create any level of nested tiled layouts with just a single method call.
  • Offers clean and simple access to frequently used layout settings such as titles, font sizes, axis labels, linked axes, and legend positioning—all of which are typically tedious to modify using standard MATLAB commands.
  • Automatically generates a full-screen figure with tight padding and spacing by default, making your visualizations more compact and presentation-ready.
  • Even if you don’t require nesting, this class serves as a user-friendly drop-in replacement for tiledlayout() with smarter defaults and better control.
Whether you're building complex dashboard-like visualizations or just want cleaner layout control with less code, nested_tiledlayout will make your workflow smoother and your plots cleaner.
All necessary class files, tutorials, and a demo script that generates the figure shown below are included in the downloadable file!
Demonstration
Want to see how easy it is to use nested_tiledlayout? Here’s a simple pseudocode-style walkthrough to give you a feel for how intuitive it is.
% Create a figure with an outer tiled layout (auto-maximized, tight spacing)
ntl = nested_tiledlayout();
% Add a plot to the main layout
ntl.nexttile();
plot(...);
% Create a nested tiled layout within a tile
ntl.make_tiles();
ntl.nexttile();
plot(...);
ntl.nexttile();
plot(...);
% Create a further nested level inside the current one
ntl.make_tiles();
ntl.nexttile();
plot(...);
% Go back up one level
ntl.out_tiles();
% Change appearance of current layout (e.g., title, legend)
ntl.change_settings("Title", "My Nested Section", "LegendLoc", "east");
% Jump back to the main layout
ntl.out_tiles();
% Add another plot at the outermost level
ntl.nexttile();
plot(...);
% Modify any layout layer (e.g., layer 1 is the outermost)
ntl.change_settings_layer(1, "Title", "Full Figure Layout", "TitleSize", 18);

Citar como

Fumiya (2026). nested_tiledlayout: Multi-Level Tiled Layouts in MATLAB (https://la.mathworks.com/matlabcentral/fileexchange/180643-nested_tiledlayout-multi-level-tiled-layouts-in-matlab), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2023a
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Versión Publicado Notas de la versión
1.0.2

Fixes some code comments

1.0.1

changed title

1.0.0