t = tiledlayout
t = tiledlayout(m, n)
t = tiledlayout(arrangement)
t = tiledlayout(parent, ...)
t = tiledlayout(..., propertyName, propertyValue)
| Parameter | Description |
|---|---|
| m | Number of tile rows: positive integer. |
| n | Number of tile columns: positive integer. |
| arrangement | 'flow' or 'vertical' or 'horizontal': automatic arrangement mode. |
| parent | Parent figure handle. |
| propertyName | Property name: 'TileSpacing', 'Padding', 'TileIndexing', or other layout property. |
| propertyValue | Property value corresponding to the property name. |
| Parameter | Description |
|---|---|
| t | TiledChartLayout graphics object. |
tiledlayout creates a tiled chart layout in the current figure for displaying multiple plots in a grid arrangement.
tiledlayout with no input arguments creates a flow layout.
tiledlayout(m, n) creates a layout with m rows and n columns of tiles.
tiledlayout('flow') creates a layout that automatically adjusts the grid as axes are added. tiledlayout('vertical') stacks axes from top to bottom, and tiledlayout('horizontal') stacks axes from left to right.
Use nexttile to create axes within the layout.
Properties:
| Property | Description |
|---|---|
| GridSize | [m, n] grid dimensions. This property can be set only while the layout is empty; setting it manually changes TileArrangement to 'fixed'. |
| TileArrangement | Read-only arrangement: 'fixed', 'flow', 'vertical', or 'horizontal'. |
| TileSpacing | Spacing between tiles: 'loose', 'compact', 'tight', or 'none'. The legacy value 'normal' is accepted as 'loose'. |
| Padding | Padding around the layout: 'loose', 'compact', or 'tight'. The legacy value 'normal' is accepted as 'loose', and 'none' is accepted as 'tight'. |
| TileIndexing | Tile numbering order: 'rowmajor' or 'columnmajor'. |
| Title, Subtitle, XLabel, YLabel | Layout-owned text objects used by title, xlabel, and ylabel. |
t = tiledlayout(2, 2);
ax1 = nexttile;
plot(ax1, 1:10, (1:10).^2);
ax2 = nexttile;
plot(ax2, 1:10, sqrt(1:10));
t.TileSpacing = 'compact';
| Version | Description |
|---|---|
| 1.17.0 | initial version |