%% Specify x-Axis Tick Labels for 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. Create two plots of random data. Set the x-axis tick values and labels for the second plot by specifying ax2 as the first input argument.

tiledlayout(2,1)
ax1 = nexttile;
plot(ax1,rand(3))

ax2 = nexttile;
plot(ax2,rand(3))
xticks(ax2,[1 2 3])
xticklabels(ax2,{'one','two','three'})

% Copyright 2019 The MathWorks, Inc.