The Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: save figures without displaying
Replies: 28   Last Post: Feb 24, 2015 4:36 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Yuri Geshelin

Posts: 153
Registered: 10/15/07
Re: save figures without displaying
Posted: Jan 30, 2015 9:07 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Erik" wrote in message <mafqu6$h60$1@newscl01ah.mathworks.com>...
> This is a new solution based on the solution by Jesse Hopkins in post 15.
>
> I tried the 'ResizeFcn' trick, but it fails on my installation: Windows8x64, MATLAB R2014b. Looking in the documentation on figure properties, I found a similar 'CreateFcn' property. This function does the trick, because 'CreateFcn' is called after the figure and its properties (including 'Visible' being 'off') have been loaded. So using:
>
> set(gcf,'CreateFcn','set(gcf,''Visible'',''on'')')
>
> on an invisible figure, then you save it as a .fig file, makes the figure become visible after you open the .fig file from your explorer.
>
> I expect this works on figures with complex subplots etc. as well, since the main figure's 'Visible' property is the only thing that is set from 'off' to 'on'.


I tried this, it did not work for me. Here is what I tried:

close all
plot(1:10)
set(1,'vis','off')
set(1,'createfcn','set(gcf,''visible'',''on'')')
saveas(1,'tstvis.fig')
close all
open('tstvis.fig')

The figure flashes for a split second, then becomes invisible.

This holds true for:

MATLAB Version 8.1.0.604 (R2013a), Windows 7
MATLAB Version 7.5.0.342 (R2007b), Windows 7
MATLAB Version 7.7.0.471 (R2007b), SunOS 5.10


Date Subject Author
4/14/11
Read save figures without displaying
Oliver
4/14/11
Read Re: save figures without displaying
Grzegorz
4/14/11
Read Re: save figures without displaying
Oliver
4/14/11
Read Re: save figures without displaying
John
4/14/11
Read Re: save figures without displaying
Grzegorz
4/14/11
Read Re: save figures without displaying
Yuri Geshelin
4/19/11
Read Re: save figures without displaying
Oliver Woodford
4/20/11
Read Re: save figures without displaying
Yuri Geshelin
10/30/12
Read Re: save figures without displaying
Lisa Thierbach
12/13/12
Read Re: save figures without displaying
Tor Inge Birkenes
12/13/12
Read Re: save figures without displaying
Steven Lord
12/13/12
Read Re: save figures without displaying
Yuri Geshelin
12/14/12
Read Re: save figures without displaying
Tor Inge Birkenes
12/13/12
Read Re: save figures without displaying
Yuri Geshelin
11/1/13
Read Re: save figures without displaying
Julian
11/22/13
Read Re: save figures without displaying
Bo Zhang
2/11/14
Read Re: save figures without displaying
Benjamin
8/29/14
Read Re: save figures without displaying
Joe
9/2/14
Read Re: save figures without displaying
Joe
1/29/15
Read Re: save figures without displaying
Erik
1/29/15
Read Re: save figures without displaying
Yuri Geshelin
1/30/15
Read Re: save figures without displaying
Erik
1/30/15
Read Re: save figures without displaying
Yuri Geshelin
1/30/15
Read Re: save figures without displaying
Marco
1/30/15
Read Re: save figures without displaying
Yuri Geshelin
1/31/15
Read Re: save figures without displaying
Yuri Geshelin
2/2/15
Read Re: save figures without displaying
Marco
2/3/15
Read Re: save figures without displaying
Yuri Geshelin
2/24/15
Read Re: save figures without displaying
Joe

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2017. All Rights Reserved.