%% Export Multipage PDF
% To create multipage PDFs, set the 'Append' name-value argument to true.
% For example, create a line plot and save the contents of the axes to the file myplots.pdf.

plot([0 0.3 0.1 0.6 0.4 1])
ax = gca;
exportgraphics(ax,'myplots.pdf')

%
% Next, create a bar chart and save the contents of the axes as a second page in myplots.pdf.

bar(1:10)
exportgraphics(ax,'myplots.pdf','Append',true)

% Copyright 2020 The MathWorks, Inc.