[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ChangeSet] print.m: support for figure handles
From: |
Ben Abbott |
Subject: |
Re: [ChangeSet] print.m: support for figure handles |
Date: |
Fri, 29 Feb 2008 12:11:05 -0800 |
On Friday, February 29, 2008, at 10:40AM, "Søren Hauberg" <address@hidden>
wrote:
>
>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
>
Good point. Matlab respects that behavior as well.
I've attached the correct changeset.
Ben
changeset-print.txt
Description: Text document