bugGNU Octave - Bugs: bug #36480, No markers in Legends with...

 
 

bug #36480: No markers in Legends with errorbar-plot

Submitter:  None
Submitted:  Wed 16 May 2012 10:32:10 AM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Inaccurate Result
Status:  Fixed Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * dev
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 09 Nov 2013 06:38:50 PM UTC, comment #5: 

Nice simple fix.  I pushed it here (http://hg.savannah.gnu.org/hgweb/octave/rev/5fbab07c419f).  I changed the commit message to have the bug number in the first line since this is customary.  Closing report.

Rik <rik5>
Group administrator
Wed 06 Nov 2013 09:43:40 PM UTC, comment #4: 

Changing the order of the childrens within errorbar may be the better solution, at least matlab does it that way :-)



(file #29552)

Stefan Mahr <dac922>
Wed 06 Nov 2013 06:30:22 PM UTC, comment #3: 

Attached patch fixes this problem and bug #37337, but I don't check it for regressions yet.

(file #29550)

Stefan Mahr <dac922>
Wed 06 Nov 2013 06:13:30 PM UTC, comment #2: 

I can confirm this bug is still present (also seems a regression from  bug #29057). This can be seen easily by comparing the following:


figure ();
x = -10:0.5:10; plot (x, sin (x), "-ob", x, cos (x), "-xb"); legend ("sin (x)", "cos (x)");
figure ();
x = -10:0.5:10; errorbar (x, sin (x), 0.5, "-ob", x, cos (x), 0.5, "-xb"); legend ("sin (x)", "cos (x)");


On the first figure (where plot() was used), the legend shows the marker, while on the second (done with errorbar()), ther is only the text.

I'm not super familiar with the code for graphics but I tracked it down to somewhere before line 840 of legend.m


              marker = get (hplots(k), "marker");


where this returns "none" for an errorbar plot. This however is not true as can be seen from:


x = -10:0.5:10; h = plot (x, sin (x), "-ob", x, cos (x), "-xb");
get (h, "marker")
x = -10:0.5:10; h = errorbar (x, sin (x), 0.5, "-ob", x, cos (x), 0.5, "-xb");
get (h, "marker")


Carnë Draug <carandraug>
Group Member
Wed 23 Jan 2013 01:39:21 PM UTC, comment #1: 

Hi Christian,
your example works for me using version 3.6.2 with both backends (fltk and gnuplot).

Regards, Andy

Andreas Weber <andy1978>
Group Member
Wed 16 May 2012 10:32:10 AM UTC, original submission:  

This problem seem to be solved in bug #29057 in Octave Version 3.2.3.

However, in my version 3.4.0 marker are still not present in plots like errorbar() or semilogyerr().

An example:


figure(1)
semilogyerr([1:3],[10^1 10^2 10^3],[10^0.2 10^0.5 10^1],'ko')
legend('1')
figure(2)
errorbar([1:3],[3 5 6],[1 2 2.5],'ko')
legend('2')


I am not able to change octave files in a way that helps. Is anyone here to give me the patched files to solve this problem.
Thanks for help!
Christian

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #29552:  errorbar2.diff added by dac922 (3KiB - text/x-patch)
file #29550:  errorbar_legend.diff added by dac922 (974B - text/x-patch)

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by dac922 (Updated the item)
  • -email is unavailable- added by andy1978 (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-11-09 rik5 StatusNone Fixed
        Open/ClosedOpen Closed
    2013-11-06 dac922 Attached File- Added errorbar2.diff, #29552
    2013-11-06 dac922 Attached File- Added errorbar_legend.diff, #29550
    2013-11-06 carandraug Release3.4.0 dev
    2013-10-08 rik5 Dependencies- Depends on bugs #37337

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code