Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: save figures without displaying
Date: Thu, 14 Apr 2011 13:34:08 +0000 (UTC)
Organization: Bedford Institute of Oceanography
Lines: 35
Message-ID: <io6t4g$mf3$1@fred.mathworks.com>
References: <io6jkk$5em$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-00-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1302788048 23011 172.30.248.45 (14 Apr 2011 13:34:08 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 14 Apr 2011 13:34:08 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1149396
Xref: news.mathworks.com comp.soft-sys.matlab:721872

Oliver,

I think the workaround is to set up a listener, which will monitor the children of the root and as soon as the new ones appear make them visible. Unless it contradicts with your other preferences and work style, you can add the listener to startup: it won't prevent you from setting the 'visible' property to 'off', as it will only be applied to the new figure handles that appear in the workspace.

Defining Events and Listeners:

http://www.mathworks.com/help/techdoc/matlab_oop/brb6gnc.html#top_of_page

HTH

Yuri

"Oliver" wrote in message <io6jkk$5em$1@fred.mathworks.com>...
> Hi all, I've looked around for ages but cannot find a different solution. I fear there isn't one.
> 
> Problem: I have a tool that batch processes data and creates loads (00's) of figures. I don't want them flashing up and getting in the way while the user is still trying to work on the machine.
> 
> Current solution:
> set(fig, 'visible','off')
> saveas(fig,'file.fig','fig')
> close(fig)
> 
> This is fine, however when trying to open the saved .fig file they remain invisible. 
> 
> I tried....
> set(fig, 'visible','off')
> saveas(fig,'file.fig','fig')
> set(fig, 'visible','on')
> close(fig)
> 
> In the hope it wouldn't be displayed, but it is.
> 
> Next idea is to open the .fig using fopen and edit the file manually to set visibility to on, then re-save the edited .fig, but the data format is unknown.
> 
> Any ideas how to save invisible figures, but have them open as visible?