octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ChangeSet] print.m: support for figure handles


From: Søren Hauberg
Subject: Re: [ChangeSet] print.m: support for figure handles
Date: Fri, 29 Feb 2008 16:40:23 +0100

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]