bugGNU Octave - Bugs: bug #61526, legend() messes up line styles...


bug #61526: legend() messes up line styles when handed specific line handles as input

Submitted by:  None
Submitted on:  Tue 23 Nov 2021 06:16:23 AM UTC  
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Inaccurate Result
Status:  Ready For Test Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  Open Release:  6.3.0
Operating System:  Any

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Tue 23 Nov 2021 09:44:41 PM UTC, comment #2: 

I pushed a change on default (which will become Octave 7 soon):


I tested with the following simpler example:

h = plot (1:10, 1:10, "xb", 1:10, (1:10)+1, "-r");
legend ();
legend (h(2));

Marking ready for test.

Pantxo Diribarne <pantxo>
Project Member
Tue 23 Nov 2021 10:20:50 AM UTC, comment #1: 

I can confirm the issue. Reproducing the example verbatim and attaching the result:

f = figure;
ax = axes(f);
h = plot(ax,rand(5,1),rand(5,2));

Pantxo Diribarne <pantxo>
Project Member
Tue 23 Nov 2021 06:16:23 AM UTC, original submission:  

as the title says, the legend function messes up the line styles/markers when only a subset of line handles are handed over to the function. I've attached a minimal example where you can see that "data2" suddenly got an x-marker. A workaround is to set the legend to off and redraw it.



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #52328:  buglegend.png added by pantxo (18KiB - image/png)
file #52327:  legend_bug.m added by None (174B - text/x-objcsrc)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by pantxo (Updated the item)
  • -email is unavailable- added by None (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-11-23 pantxo StatusConfirmed => Ready For Test
    2021-11-23 pantxo Attached File- => Added buglegend.png, #52328
        StatusNone => Confirmed
    2021-11-23 None Attached File- => Added legend_bug.m, #52327

    Back to the top

    Powered by Savane 3.7