bugGNU Octave - Bugs: bug #37337, Legend not working for hggroup...


bug #37337: Legend not working for hggroup objects with linestyles

Submitted by:  Rik <rik5>
Submitted on:  Wed 12 Sep 2012 06:11:44 PM UTC  
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  dev Operating System:  Any

Add a New Comment(Rich Markup)

You are not logged in

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


Sat 09 Nov 2013 06:39:24 PM UTC, comment #4:

Fixed by this changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/5fbab07c419f). Closing report.

Rik <rik5>
Project Administrator
Sat 09 Nov 2013 04:57:55 PM UTC, comment #3:

This bug is related to bug 36480 and can be fixed with this patch

Stefan Mahr <dac922>
Sat 15 Sep 2012 05:52:42 PM UTC, comment #2:

Thanks for looking at this. The problem is not the color of the lines, which is picked up, but the marker style ('*' or 'x' or 'd') which isn't in the legend.

Here is some more sample code:

This draws two plots and places a legend on the graph. The line object drawn with the plot command correctly has the marker 'X' in the legend. The hggroup drawn with errorbar doesn't have the 'O' marker in the legend. I've attached a png of the output.

(file #26558)

Rik <rik5>
Project Administrator
Sat 15 Sep 2012 04:30:31 PM UTC, comment #1:

it seems to work on latest dev source.
See attached copy of gnuplot print on cygwin

(file #26557)

marco atzeri <matzeri>
Wed 12 Sep 2012 06:11:44 PM UTC, original submission:

The legend command is not working for certain plots that have hggroup objects. Although it is picking up the correct color, it is not picking up the marker style correctly.

Example code:

The issue is in legend.m when it picks out which objects to annotate. It is moving down below the hggroup object into the individual line objects which make up the errorbars. These lines don't have a marker property because that is something only the hggroup has.

I think this may be a general issue. In example 16 from legend.m there is a bar chart created which uses hggroups and patch objects underneath those. If I change the patch object color directly and update the legend then the color is changed, despite the fact that the hggroup color remains what it previously was set to.

Rik <rik5>
Project Administrator


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

Attach Files:

Attached Files
file #26558:  plot.png added by rik5 (17KiB - image/png)
file #26557:  errorbar.png added by matzeri (17KiB - image/png)


Depends on the following items: None found

   bug dependencies.


Carbon-Copy List
  • -email is unavailable- added by dac922 (Posted a comment)
  • -email is unavailable- added by matzeri (Updated the item)
  • -email is unavailable- added by rik5 (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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-11-09 rik5 StatusNone => Fixed
        Open/ClosedOpen => Closed
    2013-10-08 rik5 Dependencies- => bugs #36480 is dependent
    2012-09-15 rik5 Attached File- => Added plot.png, #26558
    2012-09-15 matzeri Attached File- => Added errorbar.png, #26557

    Back to the top

    Powered by Savane 3.3