bugGNU Octave - Bugs: bug #33463, legend broken for scatter plots


bug #33463: legend broken for scatter plots

Submitted by:  Ben Abbott <bpabbott>
Submitted on:  Thu Jun 2 12:17:21 2011  
Category: PlottingSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Ben AbbottOpen/Closed: Closed
Release: 3.4.0Operating System: Mac OS

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

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


(Jump to the original submission Jump to the original submission)

Sun Mar 16 18:46:44 2014, comment #8:

Only 3 years after the initial report, I've pushed a patch for legend and scatter objects (http://hg.savannah.gnu.org/hgweb/octave/rev/3a1a4d587c4e).

Rik <rik5>
Project Administrator
Wed Sep 12 17:26:38 2012, comment #7:

Still present in the development code. Re-titling this report to reflect the remaining open issue. See comment #1 for example code to reproduce the problem.

Rik <rik5>
Project Administrator
Mon Aug 13 14:50:26 2012, comment #6:

David, See comment #3. This issue has been fixed on the development branch. Unless you build from sources, it won't show up until the 3.8.0 release.

Rik <rik5>
Project Administrator
Mon Aug 13 11:47:02 2012, comment #5:


This list is intended for fixing bugs. For help with Octave please use the mail-list, help@octave.org.

Ben Abbott <bpabbott>
Project Member
Mon Aug 13 10:48:51 2012, comment #4:

I plotted a figure with area. However no legend is rendered, no colour is indicated. Does anyone have any ideas?

Thank you.

t= linspace(0,10,100);

hold on
hold off;
ylabel('sin(t)'); xlabel('t');
legend("lower", "upper");
grid on;set(gca,'Layer','top');
title('Rectified Sine Wave');

David Lai <davidlai>
Sat Jun 9 00:23:30 2012, comment #3:

This issue has been partially fixed by Kostas' changeset here (http://hg.savannah.gnu.org/hgweb/octave/rev/daad312c8af0). A single patch object now correctly displays a legend. However, the first example in this bug report, scatter (), still fails. The issue is probably connected with hggroups. Interestingly, both bar graphs and pie charts, which also use hggroups, do work.

Rik <rik5>
Project Administrator
Sat Oct 1 15:40:53 2011, comment #2:

I"ve been meaning to look at this, but haven't found the time.

Is someone is inclined, I'd start by looking at what is done for 14th demo for legend(). In this instance gnuplot does provide the proper result for patches (which are actually children of hggroups).

Which produces,

However, the fltk backend does not.

Ben Abbott <bpabbott>
Project Member
Sat Oct 1 15:02:49 2011, comment #1:

Simpler example code directly using patch which shows that legend is not picking up any data from the patch object.

The text "patch1" is displayed in the legend but no color information.

Rik <rik5>
Project Administrator
Thu Jun 2 12:17:21 2011, original submission:

The legend does not render correctly for patches. For the example below ...

For gnuplot, no legend is rendered, and for FLTK there is no symbol/line/color indicated.

I've attached a pdf illustrating the result from Matlab.

Ben Abbott <bpabbott>
Project Member


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

Attach File(s):

Attached Files
file #23494:  matlab.pdf added by bpabbott (86kB - application/pdf)


Depends on the following items: None found

   bug dependencies.


Carbon-Copy List
  • -unavailable- added by davidlai (Posted a comment)
  • -unavailable- added by rik5
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by bpabbott (Submitted the item)

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

    Only project members can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun Mar 16 18:46:44 2014rik5StatusConfirmed=>Fixed
    Wed Sep 12 17:26:38 2012rik5Summarylegend broken for patches=>legend broken for scatter plots
    Sat Jun 9 00:23:30 2012rik5Carbon-Copy-=>Added konstantinos poulios
    Sun Jan 8 15:09:16 2012rik5Dependencies-=>bugs #35260 is dependent
    Wed Nov 30 17:33:25 2011rik5Dependencies-=>bugs #34881 is dependent
    Sat Oct 1 15:02:49 2011rik5StatusNone=>Confirmed
      Summarybroken legend for patches=>legend broken for patches
    Thu Jun 2 12:18:03 2011bpabbottAttached File-=>Added matlab.pdf, #23494

    Back to the top

    Powered by Savane 3.1-cleanup1