%% Copy Figure
% Display a plot with an annotation that extends beyond the bounds of the axes. Then copy the contents of the figure.

plot(1:10)
annotation('textarrow',[0.06 0.5],[0.73 0.5],'String','y = x ')
f = gcf;
copygraphics(f)

% Copyright 2019 The MathWorks, Inc.