Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: save figures without displaying
Date: Thu, 13 Dec 2012 12:21:08 +0000 (UTC)
Organization: Kongsberg Maritime AS
Lines: 16
Message-ID: <kach7k$84p$1@newscl01ah.mathworks.com>
References: <io6jkk$5em$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-05-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1355401268 8345 172.30.248.37 (13 Dec 2012 12:21:08 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 13 Dec 2012 12:21:08 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 3606226
Xref: news.mathworks.com comp.soft-sys.matlab:784742

> Any ideas how to save invisible figures, but have them open as visible?

I have made a function that changes the visible parameter on a saved .fig file, thus make a fig file saved invisible open as visible. It looks like this:

function makevisible(file)
f=load(file,'-mat');
n=fieldnames(f);
f.(n{1}).properties.Visible='on';
save(file,'-struct','f')
end

Just save this to makevisible.m and call makevisible('figure.fig'). Note that the .fig extension is necessary.  

Sources:
http://undocumentedmatlab.com/blog/fig-files-format/ (to understand enough of the fig file format)
http://blogs.mathworks.com/pick/2008/08/20/advanced-matlab-dynamic-field-names/ (to make the code more efficient)