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

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

[Octave-bug-tracker] [bug #33757] Legend using DisplayName not displayed


From: Rik
Subject: [Octave-bug-tracker] [bug #33757] Legend using DisplayName not displayed
Date: Tue, 25 Sep 2012 00:18:00 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:15.0) Gecko/20100101 Firefox/15.0.1

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

I'd say that a new bug report should be opened since the behavior is
different.  The bug I fixed was with the behavior of 'show' and 'toggle'.  The
stuff that you have uncovered is about how the DisplayName property is
implemented.

A partial fix doesn't seem too bad.  Basically, IF there are no legend names
provided AND there are no DisplayName properties on the graphics objects
found, then use data1, data2, ..., dataN.  Maybe you can verify this again,
but why when the legend is created isn't the DisplayName property updated? 
See the code below, which in Octave definitely sets the DisplayName property.


h = plot (1:10);
get (h, 'displayName')
ans = 
hl = legend (h, 'mydata');
get (h, 'displayName')
ans = mydata


The other thing to do is to try and figure out where Matlab is holding the
labels for the legend if it isn't in the displayName property.  My guess is
the 'string' property of the legend.  Try the following in Matlab.


h = plot (rand (3));
hl = legend ('show');
get (hl, 'string')


If this is where they are storing things then the fix isn't that hard.  Octave
would simply need to write the data1, data2, ... labels into a cellstr in the
'string' property of the legend AND not update the DisplayName properties of
the children.


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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