%% Clear Specific Axes
% Starting in R2019b, you can display a tiling of plots using the tiledlayout and nexttile functions. Call the tiledlayout function to create a 2-by-1 tiled chart layout. Call the nexttile function to create the axes objects ax1 and ax2. Add plots to both axes.

tiledlayout(2,1)
ax1 = nexttile;
surf(ax1,peaks)

ax2 = nexttile;
contour(ax2,peaks)

%
% Clear the surface plot from the upper axes by specifying ax1 as an input argument to cla.

cla(ax1)

%
% Now, reset all properties for the axes, including the camera properties that control the view, by using the optional input argument 'reset'.

cla(ax1,'reset')

% Copyright 2019 The MathWorks, Inc.