When nodisplay=1, the figure has to be set visible before saving and closing, otherwise it is saved as not visible and when users try to open it, the saved figure is invisible (ticket 216).

The process is so quick that the figure is closed before it is made visible on the screen, so complying with nodisplay requirements, keeping thew whole procedure behind the scenes.
time-shift
Marco Ratto 2012-04-27 11:48:26 +02:00 committed by Michel Juillard
parent 8fec04dbf8
commit bb94a39c85
1 changed files with 3 additions and 0 deletions

View File

@ -38,6 +38,9 @@ if ~exist('OCTAVE_VERSION')
eval(['print -dpdf ' fname]);
end
if find(strcmp('fig',DynareOptions.graph_format))
if DynareOptions.nodisplay
set(h, 'Visible','on');
end
saveas(h,[fname '.fig']);
end
end