%% Copy Tiled Chart Layout
% Display two plots in a tiled chart layout. Then copy both plots to the clipboard by passing the TiledChartLayout object to the copygraphics function.

t = tiledlayout(2,1);
nexttile
plot([1 2 3])
nexttile
plot([3 2 1])
copygraphics(t)

% If you want to copy just one of the plots, call the nexttile function with the axes return argument. Then pass the axes to the copygraphics function.
% Copyright 2019 The MathWorks, Inc.