Homogeneize behavior for PDF and FIG under Octave

time-shift
Sébastien Villemot 2012-09-18 11:12:11 +02:00
parent 469a1d2c25
commit cba7a3fcc8
1 changed files with 8 additions and 5 deletions

View File

@ -44,12 +44,15 @@ if any(strcmp('pdf',cellstr(DynareOptions.graph_format)))
eval(['print -dpdf ' fname]);
end
end
if ~exist('OCTAVE_VERSION') ...
&& any(strcmp('fig',cellstr(DynareOptions.graph_format)))
if DynareOptions.nodisplay
set(h, 'Visible','on');
if any(strcmp('fig',cellstr(DynareOptions.graph_format)))
if exist('OCTAVE_VERSION')
warning('Octave cannot create fig files!')
else
if DynareOptions.nodisplay
set(h, 'Visible','on');
end
saveas(h,[fname '.fig']);
end
saveas(h,[fname '.fig']);
end
if DynareOptions.nodisplay
close(h);