bugGNU Octave - Bugs: bug #31822, get/set children changes order

 
 

bug #31822: get/set children changes order

Submitter:  Ben Abbott <bpabbott>
Submitted:  Wed 08 Dec 2010 02:49:07 AM 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:  * dev Operating System:  * Mac OS
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 08 Dec 2010 02:39:00 PM UTC, comment #2: 

I ran the dump_demos script for the gnuplot backend and updated the plots at the link below.

http://homepage.mac.com/bpabbott/index.html

Regarding you change, everything looks correct to me.

Ben Abbott <bpabbott>
Group Member
Wed 08 Dec 2010 07:47:58 AM UTC, comment #1: 

I checked in the following change:

http://hg.savannah.gnu.org/hgweb/octave/rev/71cce7108190

Does it break anything else?  If so, reopen this bug report with additional info.

John W. Eaton <jwe>
Group administrator
Wed 08 Dec 2010 02:49:07 AM UTC, original submission:  

The set/get sequence flips the order of the children.


octave:1> x = 0:0.1:10;
octave:2> h = plot (x, sin(x), x, cos(x))
h =
  -38.362
  -39.023
octave:3> get (gca, "children")
ans =
  -39.023
  -38.362
octave:4> set (gca, "children", get (gca, "children"));
octave:5> get (gca, "children")
ans =
  -38.362
  -39.023


The same in Matlab gives


>> x = 0:0.1:10;
>> h = plot (x, sin(x), x, cos(x))
h =
  174.0016
  175.0011
>> get (gca, 'children')
ans =
  175.0011
  174.0016
>> set (gca, 'children', get (gca, 'children'))
>> get (gca, 'children')
ans =
  175.0011
  174.0016


Comparing the two, it appear that setting the children reverses the order.

Ben Abbott <bpabbott>
Group 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

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by bpabbott (Submitted the item)
  •  

    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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-12-08 jwe StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code