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 02 Jun 2011 12:17:21 PM UTC  
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Ben Abbott Open/Closed:  Closed
Release:  3.4.0 Operating System:  Mac OS

Add a New Comment(Rich Markup)

You are not logged in

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


( Jump to the original submission)

Sun 16 Mar 2014 06:46:44 PM UTC, 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 12 Sep 2012 05:26:38 PM UTC, 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 13 Aug 2012 02:50:26 PM UTC, 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 13 Aug 2012 11:47:02 AM UTC, 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 13 Aug 2012 10:48:51 AM UTC, 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 09 Jun 2012 12:23:30 AM UTC, 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 01 Oct 2011 03:40:53 PM UTC, 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 01 Oct 2011 03:02:49 PM UTC, 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 02 Jun 2011 12:17:21 PM UTC, 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 Files:

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


Depends on the following items: None found

   bug dependencies.


Carbon-Copy List
  • -email is unavailable- added by davidlai (Posted a comment)
  • -email is unavailable- added by rik5
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by bpabbott (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 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-03-16 rik5 StatusConfirmed => Fixed
        Open/ClosedOpen => Closed
    2012-09-12 rik5 Summarylegend broken for patches => legend broken for scatter plots
    2012-06-09 rik5 Carbon-Copy- => Added konstantinos poulios
    2012-01-08 rik5 Dependencies- => bugs #35260 is dependent
    2011-11-30 rik5 Dependencies- => bugs #34881 is dependent
    2011-10-01 rik5 StatusNone => Confirmed
        Summarybroken legend for patches => legend broken for patches
    2011-06-02 bpabbott Attached File- => Added matlab.pdf, #23494

    Back to the top

    Powered by Savane 3.3