Rank: 198409 based on 0 downloads (last 30 days) and 0 file submitted



Personal Profile:


Watch this Author's files


Comments and Ratings by Marco
Updated File Comments Rating
13 Oct 2013 export_fig Exports figures nicely to a number of vector & bitmap formats. Author: Oliver Woodford

I used export_fig in a GUI. Anyone who wishes to create a button that saves specific figures to specific locations on their PC, feel free to use the code below (where PLOTTAG is the plot's tag in plot properties):

[file,path] = uiputfile({'*.eps';'*.pdf';'*.png';'*.jpg'},'Save Figure As');

if file ~= 0
%Gets the size of the file name
%Deletes the file type from teh end of the file name and stores it
filetype(3) = file(filechar);
filetype(2) = file(filechar-1);
filetype(1) = file(filechar-2);
file(filechar) = [];
file(filechar-1) = [];
file(filechar-2) = [];
file(filechar-3) = [];

%Runs the export_fig command with the path and file name, along with the

%Message box
h = msgbox({'Done!';'';...
['The file ',file,'.',filetype,' can be found in:'];path},...
'Save Figure File','none','modal');
elseif isempty(file) == 0
h = msgbox('Not saved.',...
'Save Figure File','none','modal');

Contact us