MATLAB: Figure Visibility and Save

.jpgcan'tfigfigureformatinvisibleoffonopenplotsavesavingvisibilityvisiblewon't

Hi everyone,
I'm plotting to an "invisible" figure and I'm almost positive it's working correctly.
I save the figure both as a 'fig' and as a 'jpg'.
When I go to open the 'jpg' format, the figure opens just as I would expect it to and I can see the plots.
However, when I try to access the 'fig' format, nothing opens up. I believe this is because the "visible" setting is still set to "off".
This is obviously a problem.
Is there any way to set the visibility setting to "on" during saving? (WITHOUT ever having the figure open up?)
I'd still like to keep the image's visibility to "off" while running my code.
Thanks!
JF

Best Answer

a=1:4;
f = figure('visible','off');
plot(a)
saveas(f,'newout','fig')
Now to reopen the figure
% to open the figure
openfig('newout.fig','new','visible')