%% Set the Hold State for Multiple Axes
% Create a 1-by-2 tiled chart layout. Call the nexttile function to create two axes objects and plot into the axes.

t = tiledlayout(1,2);
ax1 = nexttile;
ax2 = nexttile;
plot(ax1,[0 1 0 1])
scatter(ax2,rand(1,10),rand(1,10),'filled')

%
% Set the hold state for both of the axes to 'on'. Then display additional data in each plot.

hold([ax1 ax2],'on')
plot(ax1,[.5 .2 .5 .2])
scatter(ax2,rand(1,10),rand(1,10),'filled')

% Copyright 2019 The MathWorks, Inc.