FUNCTION REFERENCE

saveas

Save a figure in a chosen format.

Save a figure in a chosen format.

Syntax

saveas(gcf, 'plot.svg')

Syntax

saveas(gcf, 'plot', 'svg')

Formats: fig, png, jpg, svg, pdf, bmp, tif, and 'epsc' when given explicitly. Call it as a statement.

Example

saveas(gcf, 'plot.svg')   % writes plot.svg

Differences from MATLAB: PNG, PDF and EPS export need the desktop build; SVG works everywhere. No monochrome or Level-2 EPS, EMF or M-file output.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.