View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Save Figures

4.0 | 4 ratings Rate this file 12 Downloads (last 30 days) File Size: 1.65 KB File ID: #28312 Version: 1.0
image thumbnail

Save Figures


Matthew (view profile)


This function provides a quick and easy way to save all current plots.

| Watch this File

File Information

This function is intended for people who plot lots of data and need a quick and easy way to save a large number of plots. When the function is called, it brings each open figure object to the foreground by calling its handle. This lets you see it. It prompts you in the main console window of Matlab to supply a filename. It then saves this figure with your filename using multiple file formats, and cycles to the next figure until all of the figures have been saved or skipped.

It has been designed to save in the following four formats:
-Matlab Figure (.FIG)
-Windows Enhanced Metafile (.EMF)
-Portable Network Graphics (.PNG)
-Enhanced Postscript Level 2 Color (.EPS)

These formats were picked to suit my particular needs. The .FIG lets you go back and change figures later in Matlab, .EMF is best for Microsoft Office programs since it is vectorized, EPS is best for LaTeX as a vectorized image, and PNG is good for general purpose use like websites. If you want different file formats it is easy to go into the code and either comment out undesired formats, or add new ones.

MATLAB release MATLAB 7.9 (R2009b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (7)
08 Sep 2016 Toby

Toby (view profile)

08 Sep 2016 Toby

Toby (view profile)

Customizable non-interactive functionality added here:

Comment only
28 Mar 2016 Thiago Duarte

Thank you Matthew!

31 Dec 2012 Matthew

Matthew (view profile)

Thanks for the feedback guys, I see that a non-interactive mode would be useful.

Since I've moved to Python I don't even have Matlab installed anymore. So unless I get back into using Matlab I will not be making updates to this script.

Comment only
10 May 2012 TLJ

TLJ (view profile)

Thanks for sharing your work, but as LubeF wrote, a non interactive mode would make it much better (for example, using the title of the figure if set, or fig# if not).

04 Sep 2011 Lube F

Lube F (view profile)

this is a good idea but why not add a non-interactive mode that simply saves all open figs to a specified directory in the specified formats? This would be far more useful. cheers.

Comment only
17 Feb 2011 Rahadian Zulfadin

Thank you Matthew.


Contact us