%% Reconfigure Spanned Axes
% Create a 2-by-3 tiled chart layout containing two plots in individual tiles, and one plot that spans across two rows and two columns.

t = tiledlayout(2,3);
[X,Y,Z] = peaks;

% Tile 1
nexttile
contour(X,Y,Z)

% Span across two rows and columns
nexttile([2 2])
contourf(X,Y,Z)

% Last tile
nexttile
imagesc(Z)

%
% To change the colormap for the spanned axes, identify the tile location as one containing the upper-left corner of the axes. In this case, the upper-left corner is in the second tile. Call the nexttile function with 2 as tile location, and specify an output argument to return the axes object at that location. Then pass the axes to the colormap function.

ax = nexttile(2);
colormap(ax,hot)

% Copyright 2020 The MathWorks, Inc.