octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #52641] Changing legend "displayname" property


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #52641] Changing legend "displayname" property to empty string "" leads to printing an error
Date: Tue, 12 Dec 2017 03:06:10 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Follow-up Comment #6, bug #52641 (project octave):

OK, I think I found the missing piece.  It lies in what I posted previously:
"something about not finding objects that can be labeled in a legend (but this
shouldn't be the case, it should know there is still something present, i.e.,
lines)".  That information is constructed in __getlegenddata__.m.  I altered
that function so that it constructs the hplots list even if "displayname" is
empty.  See the attached patch.

Try things like:


octave:1> graphics_toolkit fltk
octave:2> h = plot (10:-1:1, "o-;Legend String;", -[1:10], ";Leg End
String;");
octave:4> hl = legend(h, {"Line1" "Line2"});
octave:5> get(h(1),'displayname')
ans = Line1
octave:6> get(h(2),'displayname')
ans = Line2
octave:8> set (h, "displayname", "")
octave:9> get(hl,'string')
ans =
{
  [1,1] = 
  [1,2] = 
}

octave:10> legend(h, {})
octave:11> get(h(1),'displayname')
ans = data1
octave:12> get(h(2),'displayname')
ans = data2


Note that after the changes made there is a bug in gnuplot toolkit.  When the
titles are empty, gnuplot doesn't draw the legend correctly.  Instead of

title ""

the option should be

notitle

I'll wait until this bug is settled before opening a new bug report for the
gnuplot toolkit issue.

(file #42618)
    _______________________________________________________

Additional Item Attachment:

File name: octave-updateline_listener_simplify-djs2017dec12.patch Size:7 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?52641>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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