%% Export as PDF Containing Only Vector Graphics
% Display a bar chart and get the current axes. Then save the contents of the axes as a PDF containing only vector graphics.

bar([10 22 31 43])
ax = gca;
exportgraphics(ax,'BarChart.pdf','ContentType','vector')

% Copyright 2019 The MathWorks, Inc.