"Erik" wrote in message <firstname.lastname@example.org>... > 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 22.214.171.1244 (R2013a), Windows 7 MATLAB Version 126.96.36.1992 (R2007b), Windows 7 MATLAB Version 188.8.131.521 (R2007b), SunOS 5.10