[ChangeSet] print.m: support for figure handles
Søren Hauberg
soren at hauberg.org
Fri Feb 29 09:40:23 CST 2008
fre, 29 02 2008 kl. 07:05 -0800, skrev Ben Abbott:
> I modified print.m to support a figure handle as an input.
>
> It is a trivial change, but permits printing as is often done (by me) in Matlab. For example,
>
> print (gcf, '-pdf', 'foo.pdf')
>
> Please consider the attached changeset.
I don't know how matlab works, but wouldn't it make sense to do
something like
if (ishandle (arg))
old_fig = gcf();
figure (arg);
endif
...
if (ishandle(arg))
figure(old_fig);
endif
such that the current figure is still the current figure after the call
to 'print' ?
Søren
More information about the Octave-maintainers
mailing list