Code covered by the BSD License  

Highlights from
Save Multiple Figures in a click

4.8

4.8 | 20 ratings Rate this file 107 Downloads (last 30 days) File Size: 64 KB File ID: #35082
image thumbnail

Save Multiple Figures in a click

by

 

14 Feb 2012 (Updated )

Save multiple figures with a GUI in several formats. No need to save all figures one-by-one anymore!

| Watch this File

File Information
Description

savemultfigs allows one to save all opened figures using a nice user interface and in several formats in one time. No need to save all figures one-by-one anymore!

The following features are available:
- Select which figures to save in a click
- Name each figure independently based on the figure name if specified (credits go to Tassos for this feature)
- Save the same figures in several formats at once
- Save in 14 different formats (fig, jpg, eps, tif, etc.)
- Create a subdirectory for each format

This tool is particularly suited if you have a large number of figures to export at once and/or if you often save the same figure in several formats (fig, tif and eps for example).

Required Products MATLAB
MATLAB release MATLAB 7.13 (R2011b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (31)
29 Jan 2014 Bryan

This is a great tool. One suggestion: if you change the eps box to epsc then it will save as a color image.

07 Nov 2013 Soner Ulun  
27 Sep 2013 ahmed

perfct tool

27 Aug 2013 Sofie  
21 Aug 2013 Leonardo Jose Trejo

Very nice little tool. Thanks! Two comments: first, when saving files of a given type, e.g. ".fig," the function didn't append the extension to the file names, so Windows Explorer didn't know how to open the files later. It would be nice to auto-append this. Also, on a Mac, I could not paste a string of characters into the field for folder name or the fields for file names. I wanted to use as the base for the file name and had to type in a long string into each field. This worked in Windows, however.

07 Aug 2013 Justin  
25 Jul 2013 Tom

so,so good. thank you for taking the time to create this.

17 Jul 2013 Manolis Trypakis

You saved me a huge amount of time. Very helpful, efficient and flexible. Thank u Nocolas!

09 Feb 2013 Rajib Mozumder

Excellent GUI! For some reason, when I save files as .eps, they are saved as black and white and .emf doesn't work! Other than that, all the other formats are working fine.

10 Dec 2012 Nicolas Beuchat

Hi Lucas,

I imagine that you are referring to the default file name feature? The program take as default filename the figure name (not the title). You can change the figure name by doing:

set(gcf,'name','newfigurename')

Cheers!

10 Dec 2012 Lucas

When I download the file, I seem to be getting an older version rather than the march 2012 update

25 Oct 2012 Jessica ?

Yes, it's called two times. Thank you very much! The function is really useful for me !

24 Oct 2012 Nicolas Beuchat

Hi Jessica!

Did you call savemultfigs a second time? Or do you have this error systematically? There is a bug I haven't solved yet that gives this error when savemultfigs is called a second time while the other savemultfigs is still open.

If that's the case, the solution for now is simply to close the gui and relaunch savemultfigs.

Thanks for the comments! I will try to solve this bug and incorporate other useful comments.

Cheers,
Nicolas

24 Oct 2012 Jessica ?

Hi, when I run the code, a problem comes out'Conversion to logical from cell is not possible.

Error in savemultfigs>pushbuttonSave_Callback (line 341)
if dosave

Error in gui_mainfcn (line 96)
feval(varargin{:});

Error in savemultfigs (line 39)
gui_mainfcn(gui_State, varargin{:});

Error in
@(hObject,eventdata)savemultfigs('pushbuttonSave_Callback',hObject,eventdata,guidata(hObject))


Error while evaluating uicontrol Callback'

Could anyone help me?
Thanks a million.

15 Oct 2012 b3824855

This is great! Thank you very much for creating this! Saved me so much time! :)

07 Sep 2012 Alan

What I find Odd is the inconsistency in this program saving, vice using save in the toolbar.
For instance, I have my figures set up with the PaperOrientation to Landscape. When I save as PDF from the toolbar, MATLAB still saves it in Portrait format. Your program is actually better for PDF as it saves it in Landscape.
However, the opposite is true for PNG files. Saving from the Toolbar gives me landscape, your program gave me rotated landscape. (Easy enough to fix with a graphics editor though)

Don't get me wrong, great tool! Will save me a lot of time, regardless.

21 Aug 2012 Abhinav Garg

Very helpful. But I have issues when saving the figures as .eps as it saves them as black & white image. Please clarify.

21 Aug 2012 Abhinav Garg

Very helpful. But I have issues when saving the figures as .eps as it saves them as black & white image. Please clarify.

13 Apr 2012 Matteo Niccoli

Very much needed

08 Apr 2012 Scott

Handy! One suggestion: if the output directory doesn't exist, offer to make it. I expected this because it already makes directories for the different file types.

05 Apr 2012 Jeff

Great submission. I would suggest adding an option for anti-aliasing (see Myaa - My Anti-Alias for Matlab). Also great would be the ability to use TeX to render the text. Finally it would be great if you could merge all the results into a single PDF.

24 Mar 2012 DimoneTHEone  
09 Mar 2012 Tassos

Yeap, changes should definitely be kept in the same file :) So, please go ahead and update the file here too.

08 Mar 2012 Nicolas Beuchat

Thank you for the suggestion! It is a very good idea!

I implemented your modification with a slight change in the code (you actually don't need to convert from mat2cell and cell2mat by using defaultfilenames{i}).

If you don't mind, I'd rather update this file so that everything is kept at one place! I will obviously mention you.

Thanks again!

08 Mar 2012 Tassos

Very useful app! However, I thought that it would be more useful if it was detecting the 'Name' given to each figure and automatically use it as default filename for the saving.

So I did the following modification, by changing the definition of 'defaultfilename' from a simple 'filename' like this:

defaultfilenames=cell(length(figlist),1);
for i=1:length(figlist)
if isempty(get(figlist(i),'Name'))
defaultfilenames(i) = mat2cell(['filename' num2str(i)]);
else
defaultfilenames(i)=mat2cell(get(figlist(i),'Name'));
end
end

Then, all you have to do is use 'defaultfilenames' for the field that displays the default filename, and also convert the string from cell to mat, just before actual saving the file (because fullfile function cannot handle cell elements).

I can post the modified file if you are interested.

Thanks

28 Feb 2012 Nicolas Beuchat

The bug is now corrected, my apologies for the delay!

27 Feb 2012 Nicolas Beuchat

Apparently the last submission was not correct too. While waiting for the corrected version, you can change the problematic lines which are lines 360 and 362 as:

saveas(handles.figlist(ind(n))

should be replaced by

saveas(handles.figlist(ind(i))

My apologies for these issues.

25 Feb 2012 Nicolas Beuchat

Actually, the last version (2/24/12) has another huge bug which make all the figures to be saved as the last figure... Please, wait for the new submission to be approved!

25 Feb 2012 Nicolas Beuchat

The last version (2/24/12) included a little bug. An error appear in the command prompt after successful saving. This bug does not affect the saving and a correction has just been submitted!
Sorry about that!

21 Feb 2012 John

Very helpful, thank you Nicolas!

21 Feb 2012 Virginie  
Updates
21 Feb 2012

Correction of the display of the number of files saved.

24 Feb 2012

Check for figures having the same filename and rename them before saving.

25 Feb 2012

Correction of a little bug that came out with the last version (24 Feb 2012) which displayed an error message after successful saving.

25 Feb 2012

Correction of another bug introduced in the 2/24/12 version (all files were saved as the last figure).

27 Feb 2012

Correction of the same bug that make the app to save all the figures as the last figure.

08 Mar 2012

Default filename is now the name of the figure (if specified). Credits go to Tassos for this update.

Contact us