[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #57372] [wish] title() should work for legend
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #57372] [wish] title() should work for legend objects |
Date: |
Fri, 6 Dec 2019 19:43:33 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko |
URL:
<https://savannah.gnu.org/bugs/?57372>
Summary: [wish] title() should work for legend objects
Project: GNU Octave
Submitted by: rik5
Submitted on: Fri 06 Dec 2019 04:43:32 PM PST
Category: Octave Function
Severity: 1 - Wish
Priority: 5 - Normal
Item Group: Feature Request
Status: Confirmed
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Any
_______________________________________________________
Details:
When using title() on legend objects the function complains
octave:2> plot (1:10)
octave:3> hl = legend ("abc")
hl = -40.527
octave:4> title (hl, "Legend Title")
error: Invalid call to title. Correct usage is:
-- title (STRING)
-- title (STRING, PROP, VAL, ...)
-- title (HAX, ...)
-- H = title (...)
It is simple enough to work around the title() function in Octave by getting
the "title" property of the legend object and setting the "string" property on
it. This does label the legend, although the look is different from that of
Matlab.
Sample code for that is
plot (1:10);
hl = legend ("abc");
ht = get (hl, "title");
set (ht, "string", "Legend Title")
The visual appearance in Octave and Matlab are attached.
file Octave_legend_title.png
file Matlab_legend_title.png
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Fri 06 Dec 2019 04:43:32 PM PST Name: Octave_legend_title.png Size:
1KiB By: rik5
<http://savannah.gnu.org/bugs/download.php?file_id=48021>
-------------------------------------------------------
Date: Fri 06 Dec 2019 04:43:32 PM PST Name: Matlab_legend_title.png Size:
5KiB By: rik5
<http://savannah.gnu.org/bugs/download.php?file_id=48022>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?57372>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #57372] [wish] title() should work for legend objects,
Rik <=