Option graph_format=pdf now works under Octave

Also copy the same Octave-specific code as for EPS printing (added in
84f0d6c7 to fix problems with hybrid
Unix/Windows parallel clusters).
parent ee9852ac
Pipeline #1930 passed with stages
in 102 minutes and 37 seconds
......@@ -3166,7 +3166,7 @@ Computing the stochastic solution
Specify the file format(s) for graphs saved to disk. Possible
values are ``eps`` (the default), ``pdf``, ``fig`` and ``none``
(under Octave, only ``eps`` and ``none`` are available). If the
(under Octave, ``fig`` is unavailable). If the
file format is set equal to ``none``, the graphs are displayed
but not saved to the disk.
......
......@@ -14,7 +14,7 @@ function dyn_saveas(h, fname, nodisplay, graph_format)
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2012-2017 Dynare Team
% Copyright (C) 2012-2019 Dynare Team
%
% This file is part of Dynare.
%
......@@ -43,10 +43,13 @@ if any(strcmp('eps',cellstr(graph_format)))
end
if any(strcmp('pdf',cellstr(graph_format)))
if isoctave
error('Octave cannot create pdf files!')
else
print(h,'-dpdf',[fname,'.pdf'])
fname = strrep(fname,'/',filesep);
fname = strrep(fname,'\',filesep);
if nodisplay && ispc
set(h, 'Visible','on');
end
end
print(h,'-dpdf',[fname,'.pdf'])
end
if any(strcmp('fig',cellstr(graph_format)))
if isoctave
......
Markdown is supported
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