Octave: support ofig graph format
parent
d77561e241
commit
32d5bc05a1
|
@ -4499,8 +4499,8 @@ Computing the stochastic solution
|
|||
graph_format = ( FORMAT, FORMAT... )
|
||||
|
||||
Specify the file format(s) for graphs saved to disk. Possible
|
||||
values are ``eps`` (the default), ``pdf``, ``fig`` and ``none``
|
||||
(under Octave, ``fig`` is unavailable). If the
|
||||
values are ``eps`` (the default), ``pdf``, ``fig`` and ``none``.
|
||||
Under Octave, ``fig`` will use Octave’s ``ofig`` format. If the
|
||||
file format is set equal to ``none``, the graphs are displayed
|
||||
but not saved to the disk.
|
||||
|
||||
|
|
|
@ -52,17 +52,12 @@ if any(strcmp('pdf',cellstr(graph_format)))
|
|||
print(h,'-dpdf',[fname,'.pdf'])
|
||||
end
|
||||
if any(strcmp('fig',cellstr(graph_format)))
|
||||
if nodisplay
|
||||
set(h,'CreateFcn','set(gcf, ''Visible'',''on'')') ;
|
||||
end
|
||||
if isoctave
|
||||
error('Octave cannot create fig files!')
|
||||
saveas(h,[fname '.ofig']);
|
||||
else
|
||||
if nodisplay
|
||||
% THE FOLLOWING LINES COULD BE USED IF BUGS/PROBLEMS ARE REPORTED USING LINE 60
|
||||
% set(h,'Units','Normalized')
|
||||
% mypos=get(h,'Position');
|
||||
% set(h,'Position',[-1 -1 mypos(3:4)])
|
||||
% set(h, 'Visible','on');
|
||||
set(h,'CreateFcn','set(gcf, ''Visible'',''on'')') ;
|
||||
end
|
||||
saveas(h,[fname '.fig']);
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue