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

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

[Octave-bug-tracker] [bug #58436] legend (leg_handle, "boxoff") no longe


From: Rik
Subject: [Octave-bug-tracker] [bug #58436] legend (leg_handle, "boxoff") no longer works
Date: Sun, 24 May 2020 21:14:17 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko

Follow-up Comment #3, bug #58436 (project octave):

I guess I missed the discussion.  My motivating example actually involved two
axes, with two legends, on the same figure.  A reduced example is shown
below.


hf = figure ();

hax1 = axes;
plot (hax1, 1:10, 'o-b');
hl1 = legend ("axes1 legend");

hax2 = axes ("parent", hf, "position", [0.2, 0.6, 0.3, 0.3]);
plot (hax2, 10:-1:1, 'x-r');
hl2 = legend ("axes2 legend");

## Desired behavior, be able to control legend without switching axes,
## or having to know that legend objects are implemented as axes objects
## and that there is therefore a property "box" that can be changed.
#legend (hl1, 'boxoff')
#legend (hl2, 'boxoff')

## One workaround, switch axes and then use commands
axes (hax1);
legend ('boxoff');
axes (hax2);
legend ('boxoff');

## Second workaround, use axes, rather than legend_handle, as first arg.
legend (hax1, 'boxon');
legend (hax2, 'boxon');


I can work around the issue, but I think it would also be easy to support the
old calling syntax.  Let me look at it. 


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58436>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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