[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Figure numbers as strings?
From: |
Ben Abbott |
Subject: |
Re: Figure numbers as strings? |
Date: |
Wed, 31 Mar 2010 13:54:38 -0400 |
On Mar 30, 2010, at 11:54 AM, Søren Hauberg wrote:
> tir, 30 03 2010 kl. 07:40 -0400, skrev Ben Abbott:
>> On Mar 30, 2010, at 1:03 AM, Michael D Godfrey wrote:
>>
>>> On 03/29/2010 09:07 PM, Søren Hauberg wrote:
>>>> Matlab does not allow this, and honestly it really is bad style. I would
>>>> enjoy being able to use this syntax (well, I already use, it just
>>>> doesn't work...)
>>>>
>>>> Cheers,
>>>> Søren
>>>>
>>> I hope this gets accepted. Convenience for users beats lots of
>>> other rules...
>>>
>>> Michael
>>
>> I have no objections. I haven't tried you patch. How does it handle ...
>>
>> figure color r
>>
>> ... and ...
>>
>> figure 7 color r
>
> That works just fine. 'figure' is already working such that if the
> number of input arguments is uneven, the first input argument needs to
> be a number or a figure handle. I just added the check that if the input
> is a string it is converted to a number. So, the change is not very
> intrusive and should pretty much just work.
>
> It is still bad style to pass a string instead of a number, though...
>
> Søren
I like the functionality and agree passing a character instead of number is bad
style.
I was worried about what the command below would do.
figure foobar
You patch handles it nicely.
octave:2> figure foobar
error: figure: expecting figure handle or figure number
I'm ok with having this pushed.
Ben