Info

This question is closed. Reopen it to edit or answer.

saveas function saves more than one file type

1 view (last 30 days)
Sarah Daggett
Sarah Daggett on 23 Apr 2015
Closed: MATLAB Answer Bot on 20 Aug 2021
For some reason that I cannot determine, if I try to save a figure as a .fig file using the saveas function (either from the command line or in the GUI), it saves my figure as a .fig , a .pdf , a .emf and a .png . Every time. No matter what I put in the command line, it always saves every file as all four of the above figure types.
Example:
saveas(gcf,'test','fig')
produces test.fig , test.emf , test.pdf and test.png
saveas(gcf,'test.fig')
produces test.fig.fig , test.fig.emf , test.fig.pdf and test.fig.png
If I go to save a new figure as a figure file named test.fig using "Save" from the GUI File menu, it saves the file as test.fig.fig , test.fig.emf , test.fig.pdf and test.fig.png . Making a change to the file and saving again (just using "Save") saves changes to all four files.
Similarly, if I go to the "File" menu in the figure GUI and select "Save As..." and attempt to save my figure as a figure file named test , it will save the figure as test.fig.fig , test.fig.emf , test.fig.pdf and test.fig.png. (Also no clue why it insists on adding that .fig to every file name when I do this.)
I have not exhaustively tested saving as all other types of files, but if I specify to save as a .png or as a .emf it only saves the figure as those file types. This seems to happen only when I try to save as a .fig file. What could possibly be causing this?

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!