octave-maintainers
[Top][All Lists]
Advanced

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

Re: Octave specific legend calling forms


From: Rik
Subject: Re: Octave specific legend calling forms
Date: Thu, 10 Oct 2019 09:48:38 -0700

On 10/10/2019 09:00 AM, address@hidden wrote:
Subject:
Re: Octave specific legend call forms
From:
Pantxo Diribarne <address@hidden>
Date:
10/10/2019 07:32 AM
To:
Ben Abbott <address@hidden>
CC:
Octave Maintainers <address@hidden>
List-Post:
<mailto:address@hidden>
Precedence:
list
MIME-Version:
1.0
References:
<CAFM7nBWRV2k9oMW4MiwTXz3gFf_py14uJGSG7CdZ=n0YQ5=+address@hidden> <address@hidden>
In-Reply-To:
<address@hidden>
Message-ID:
<CAFM7nBVeM3ALwwN9a9BiGn+ETYuZ53eY=address@hidden>
Content-Type:
multipart/alternative; boundary="000000000000a3a90605948f4540"
Message:
4



Le jeu. 10 oct. 2019 à 16:26, Ben Abbott <address@hidden> a écrit :


> On Oct 10, 2019, at 15:21, Pantxo Diribarne <address@hidden> wrote:
>
> 
> Hello,
>
> I am currently trying to rewrite the legend function and would like your opinion on an Octave specific way of manipulating legend objects. In demos we often use the following construct:
>
> plot (1:10);
> h = legend ("Hello");
> legend (h, "fontsize", 20);
>
> The last line is strange. We use "legend" to do what "set" should be doing. AFAICS this construct is not documented (only axes handles are documented to be possible as first argument). IMHO it doesn't feel natural to replace "set" by "legend" and doesn't bring any simplification so I'd like to remove this Octave specific call form.
>
> Any opinion?
>
> Pantxo 

 Matlab behaves that way.?

Ben

No, Matlab (2019b, tested online) forbids legend objects as first argument.


Did Matlab used to support this syntax?  If so, we would want Octave to stay backward-compatible for a while so that everyone's scripts from 5 years ago are still operative.

Overall, though, I agree that once you have a legend object in a handle it makes sense to act on the handle rather than re-invoking legend.

--Rik



reply via email to

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