Sat 11 Jun 2016 12:18:04 AM UTC, comment #8:
Okay, I fixed this up and added a BIST test in this cset (http://hg.savannah.gnu.org/hgweb/octave/rev/ce0f87bd0509). Closing report.
|
Fri 10 Jun 2016 08:42:52 AM UTC, comment #7:
Your questions:
close all
hax1 = axes
plot (1:10, 'b')
legend ('hax1', 'Location', 'northeast'))
hax2 = axes
## Question: is the first plot with an upward sloping line and legend still visible?
## Or has it been replaced by a blank canvas?
There is a blank canvas (ML and O)
plot (10:-1:1, 'r')
legend ('hax2', 'Location', 'northwest')
## Question: Are both plots visible? Are both legends visible?
No, only the second (with legend).
axes (hax1)
## Question: I believe this should return things to the original view.
## Only the first upward sloping line and its legend should be visible
In ML the original plot appears with legend, in Octave without legend.
axes (hax2)
## Question: I believe this should change things back to view #2
## Only one of the legends will be visible which is the red one in NorthWest.
As with hax1, in ML with and in octave without legend.
|
Wed 08 Jun 2016 10:05:30 PM UTC, comment #6:
This is slightly more complicated than I thought. I belive only the legend object associated with a particular axes is put on top. Can the original reporter try the following commands and report back, or attach images, of what happens?
|
Tue 07 Jun 2016 03:46:43 PM UTC, comment #5:
Thanks. Matlab does just what I was proposing which is to always keep legend objects ahead of regular axes object in the Z stack. I'll see if I can fix this today.
|
Mon 06 Jun 2016 04:58:49 PM UTC, comment #4:
See the docstring for the axes() command
The issue is that legend objects are made from axes objects, even though they really aren't axes. When you ask for gca to be the topmost axes object this causes the legend axes object to be hidden.
Can you test this code under Matlab and then upload the diary file?
One simple fix would be to check for any legend object and make sure it stays on top. If you look at axes.m you can see that we already do this for annotation objects
|
Mon 06 Jun 2016 03:39:54 PM UTC, comment #3:
Confirmed, and the only difference I can see in the propeties is that the "children" array of the figure have been swapped so that the gca object is now the first element, while the legend axes handle is the second. After the legend is created, the legend axes handle is the first.
This reverses the order of the children array, and the legend is drawn on top again:
|
Mon 06 Jun 2016 12:42:40 PM UTC, comment #2:
But the legend still disappears when using qt and fltk (dev branch).
|
Mon 06 Jun 2016 12:36:20 PM UTC, comment #1:
I see this error in 4.0.2, but it was fixed in the
dev. branch
|
Mon 06 Jun 2016 11:57:10 AM UTC, original submission:
In the following code
the legend gets hidden behind the plot if one uses OpenGL. Moreover, the final close command returns
error: set: invalid handle (= -14.8376)
error: called from
legend>deletelegend2 at line 1172 column 3
delete at line 60 column 5
closereq at line 42 column 5
close at line 96 column 5
error: invalid handle
error: called from
delete at line 60 column 5
closereq at line 42 column 5
close at line 96 column 5
regardless of what toolkit is used. No errors in ML.
|