saveAllFigs(varargin)
When I have many figures open, I often want to just save them all to one place quickly, without having to deal with each individually or handle creating a separate location. Available formats are .fig, .eps, .jpg, .png and .emf, but additional options can be added very easily.
Figures are saved as the title of the plot, if this exists - duplicate titles are numbered - or just by a generic numbered figure otherwise.
The first line of code also crops whitespace from the figure - setting tight to false does not crop.
saveAllFigs() - saves all open figures as .fig in a folder in the current working directory.
saveAllFigs(extension) - saves all open figures with the given extension, in a folder in the current working directory.
saveAllFigs(extension, path) - saves all open figures with the given extension, in a folder in the directory with the given path from the working directory.
Cite As
Danielle Saunders (2025). saveAllFigs(varargin) (https://www.mathworks.com/matlabcentral/fileexchange/52303-saveallfigs-varargin), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 | Typo correction! |