bugGNU Octave - Bugs: bug #41142, change to legend deletes and...

 
 

bug #41142: change to legend deletes and recreates text objects

Submitted by:  Ben Abbott <bpabbott>
Submitted on:  Tue 07 Jan 2014 11:48:44 PM UTC  
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Confirmed Assigned to:  None
Originator Name:  Ben Abbott Open/Closed:  Open
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.

 

Thu 17 Nov 2016 10:40:41 AM UTC, comment #3:

This bug is still present in the current dev 4.3.0 (39f39eb4e476).

I filed task #14243 about rewriting legend.m

Pantxo Diribarne <pantxo>
Project Member
Thu 09 Jan 2014 12:47:17 AM UTC, comment #2:

I agree the legend code needs to be rewritten with Matlab compatibility in mind. Not a simple task.

Ben Abbott <bpabbott>
Project Member
Wed 08 Jan 2014 02:49:09 AM UTC, comment #1:

Matlab's legend function is really hard to mimic exactly. As you know, we use an axes object to represent the legend and the object has extra properties beyond a regular axes object such as fontsize. We add listener's on the axes object for these special properties so that if the legend object is changed all of the child objects are updated. So, one way to make this work is just to use this interface.

The other way to get this to work is to sort handles so that the axes objects are last.

We currently destroy the legend axes object when the fontsize changes because we need to re-calculate the size of the box which will fit the new text. If you can see a better way then we can implement it, but it looks daunting.

Rik <rik5>
Project Administrator
Tue 07 Jan 2014 11:48:44 PM UTC, original submission:

With Matlab, the example below does not throw an error

Ben Abbott <bpabbott>
Project Member

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2014-08-08 rik5 StatusNone => Confirmed
    2014-08-08 rik5 Dependencies- => bugs #42940 is dependent

    Back to the top


    Powered by Savane 3.3