bugGNU Octave - Bugs: bug #50497, plotyy() legend in reverse order

 
 

bug #50497: plotyy() legend in reverse order

Submitted by:  Ray Zimmerman <rdzman>
Submitted on:  Wed 08 Mar 2017 07:29:29 PM UTC  
 
Category: PlottingSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Ray ZimmermanOpen/Closed: Closed
Release: 4.2.0Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Thu 09 Mar 2017 05:23:40 AM UTC, comment #3:

@Pantxo: Go ahead and push this to stable.

Rik <rik5>
Project Administrator
Wed 08 Mar 2017 10:50:35 PM UTC, comment #2:

I attached a simple fix for the order of legend item. The color order handling (green expected for the second axes) is probably to be found in plotyy it self.

(file #39951)

Pantxo Diribarne <pantxo>
Project Member
Wed 08 Mar 2017 07:32:18 PM UTC, comment #1:

I meant to add that this seems potentially related to bug #46835

Ray Zimmerman <rdzman>
Wed 08 Mar 2017 07:29:29 PM UTC, original submission:

When using plotyy(), the legend assigns the wrong labels to the data series, in particular, they are in the reverse order, with the first label being assigned to the last data series, etc.

The following plots illustrate the problem ...

In Matlab, the second plot will look like the first (except for the additional line on the secondary axis) and the legend will also be identical. In Octave, the legend labels all 4 lines incorrectly (reverse order), and incidentally, also uses a different color (red) from that used by Matlab (green).

Ray Zimmerman <rdzman>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #39951:  plotyy_order.patch added by pantxo (772B - text/x-patch)
file #39946:  Octave-plot.pdf added by rdzman (3KiB - application/pdf - Plots created with Octave 4.2.0, Matlab R2016a on Windows 7.)
file #39947:  Matlab-plot.pdf added by rdzman (2KiB - application/pdf - Plots created with Octave 4.2.0, Matlab R2016a on Windows 7.)
file #39948:  Octave-plotyy.pdf added by rdzman (3KiB - application/pdf - Plots created with Octave 4.2.0, Matlab R2016a on Windows 7.)
file #39949:  Matlab-plotyy.pdf added by rdzman (2KiB - application/pdf - Plots created with Octave 4.2.0, Matlab R2016a on Windows 7.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by pantxo (Updated the item)
  • -unavailable- added by rdzman (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
    Thu 09 Mar 2017 07:48:18 PM UTCrik5StatusPatch Reviewed=>Fixed
      Open/ClosedOpen=>Closed
    Thu 09 Mar 2017 05:23:40 AM UTCrik5StatusPatch Submitted=>Patch Reviewed
    Wed 08 Mar 2017 10:50:35 PM UTCpantxoAttached File-=>Added plotyy_order.patch, #39951
      StatusNone=>Patch Submitted
    Wed 08 Mar 2017 07:29:29 PM UTCrdzmanAttached File-=>Added Octave-plot.pdf, #39946
      Attached File-=>Added Matlab-plot.pdf, #39947
      Attached File-=>Added Octave-plotyy.pdf, #39948
      Attached File-=>Added Matlab-plotyy.pdf, #39949

    Back to the top


    Powered by Savane 3.1-cleanup1