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 13:00:13 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

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

I was going to ask about that.  Did you try the example from the last post
with FLTK toolkit to see how the individual items can be controlled?  In
summary there are six elements in question here whose visibility can be set:


PLOT LINE 1  ON|off
PLOT LINE 2  ON|off

LEGEND LINE 1  ON|off
LEGEND TEXT 1  ON|off
LEGEND LINE 2  ON|off
LEGEND TEXT 2  ON|off


For FLTK all of the above can be controlled individually.  So, for FLTK one
could remove all six of those elements from the plot and there is still a
square box present for the legend.

That behavior is different from the logic of gnuplot toolkit that we are
discussing.  With the line you point out, as it stands, either doing this:


PLOT LINE 1  on|OFF
PLOT LINE 2  on|OFF


or doing this


LEGEND LINE 1  on|OFF
LEGEND TEXT 1  on|OFF
LEGEND LINE 2  on|OFF
LEGEND TEXT 2  on|OFF


results in the total removal of the key.  Also, we can't individually control
the legend items, e.g.,


LEGEND LINE 1  on|OFF
LEGEND TEXT 1  ON|OFF
LEGEND LINE 2  on|OFF
LEGEND TEXT 2  on|OFF


does nothing different than if all the legend items are visible.  So, in that
sense, the line you point out really isn't doing a whole lot as far as the
gnuplot toolkit goes.

Keep that line of code, remove the line--doesn't matter too much.  And to make
gnuplot toolkit behave more like FLTK toolkit would mean--not a significant
rewrite--but enough change that it would probably substantially rewrite this
conditional logic.  But I'm not too concerned about getting a perfect match
between FLTK and gnuplot toolkit because I don't imagine individual key item
visibility properties as getting much traffic.  Typically, if someone doesn't
want a line on a plot, s/he will simply not include it in the script as
opposed to plotting it and then setting the visibility to off, or put "" for
the key text, etc.  The only way I could imagine this being used is if someone
could manually interact with a plot and, say, right click the plot object or
its property to toggle in/visible.

I guess I lean toward leaving the line of code in place, but don't feel
strongly one way or another.

    _______________________________________________________

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]