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

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

[Octave-bug-tracker] [bug #50483] legend hide fails for gnuplot since v4


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #50483] legend hide fails for gnuplot since v4.0.3
Date: Wed, 2 Aug 2017 01:52:58 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

Follow-up Comment #8, bug #50483 (project octave):

Attached is a small changeset for what you are describing.

However, I'm not sure what you are thinking is the proper behavior because
each of the legend children has its own independent 'visible' setting. 
gnuplot can't do such a thing at the moment (it probably could be done still,
but the complexity of code doesn't pay for the likelihood of the user getting
so detailed.

But FLTK seems to handle the legend children settings.  Try the following:


graphics_toolkit fltk
h1 = plot (1:10);
hold on
h2 = plot (10:-1:1);
hl = legend({'abc' 'def'});
## At this point, both lines are visible and labeled
set (h1, 'visible', 'off')
## Now, only one line is visible, and the legend has not changed
set (h2, 'visible', 'off')
## Now, neither line is visible, but the key shows two lines
kids = get(hl,'children');
set(kids(1), 'visible', 'off')
## Now the legend entries are starting to disappear
set(kids(2), 'visible', 'off')
set(kids(3), 'visible', 'off')
set(kids(4), 'visible', 'off')
## Now the key consists of an empty box


FLTK behaves different, but it seems more proper given the settings.

(file #41389)
    _______________________________________________________

Additional Item Attachment:

File name: octave-legend_conditional_gnuplot-djs2017aug02.patch Size:1 KB


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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