Bugfix in dyn_saveas

Fixed a bug for the non-Octave version where only the last active figure
was printed instead of the figure with the actual handle. Octave
eps-version still needs to be taken care of.
time-shift
Johannes Pfeifer 2013-03-16 11:47:56 +01:00
parent 36ea30346c
commit cd26c3cebd
1 changed files with 3 additions and 3 deletions

View File

@ -32,16 +32,16 @@ function dyn_saveas(h,fname,DynareOptions)
if any(strcmp('eps',cellstr(DynareOptions.graph_format)))
if exist('OCTAVE_VERSION')
eval(['print -depsc2 ' fname '.eps']);
eval(['print -depsc2 ' fname '.eps']); % still need to be fixed to take handle into account
else
eval(['print -depsc2 ' fname]);
print(h,'-depsc2',[fname,'.eps'])
end
end
if any(strcmp('pdf',cellstr(DynareOptions.graph_format)))
if exist('OCTAVE_VERSION')
warning('Octave cannot create pdf files!')
else
eval(['print -dpdf ' fname]);
print(h,'-dpdf',[fname,'.pdf'])
end
end
if any(strcmp('fig',cellstr(DynareOptions.graph_format)))