Commit cd26c3ce authored by Johannes Pfeifer's avatar Johannes Pfeifer
Browse files

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.
parent 36ea3034
......@@ -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)))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment