[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #39767] initial axes are not ordered properly
From: |
Ben Abbott |
Subject: |
[Octave-bug-tracker] [bug #39767] initial axes are not ordered properly |
Date: |
Tue, 13 Aug 2013 20:07:06 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36 |
Follow-up Comment #9, bug #39767 (project octave):
Rik,
My apologies, I think I've been confusing myself.
I have a simple example which indicates the difference between Octave and
Matlab (same conclusion as you) First Matlab,
subplot (2,1,1)
subplot (2,1,2)
findobj (gcf, 'type', 'axes')
ans =
175.0024
173.0024
get (gcf, 'children')
ans =
175.0024
173.0024
And now Octave
clf
subplot (2,1,1)
subplot (2,1,2)
findobj (gcf, 'type', 'axes')
ans =
-12.48546
-7.29506
get (gcf, 'children')
ans =
-7.29506
-12.48546
Your observation that the problem is with findobj() looks correct to me.
Should that be fixed?
diff --git a/scripts/plot/findobj.m b/scripts/plot/findobj.m
--- a/scripts/plot/findobj.m
+++ b/scripts/plot/findobj.m
@@ -196,12 +196,16 @@
idepth = 0;
h = handles;
while (numel (handles) && ! (idepth >= depth))
- children = [];
+ children = []
for n = 1 : numel (handles)
- children = union (children, get (handles(n), "children"));
+ newkids = get (handles(n), "children");
+ [~, n1, n2] = union (children, newkids);
+ children = [children(sort(n1,'descend'));
newkids(sort(n2,'descend'))];
endfor
handles = children;
h = union (h, children);
+ [~, n1, n2] = union (h, children);
+ h = [h(sort(n1,'descend')); children(sort(n2,'descend'))];
idepth = idepth + 1;
endwhile
-verbatim_
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?39767>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #39767] initial axes are not ordered properly, Ben Abbott, 2013/08/12
- [Octave-bug-tracker] [bug #39767] initial axes are not ordered properly, Ben Abbott, 2013/08/12
- [Octave-bug-tracker] [bug #39767] initial axes are not ordered properly, Rik, 2013/08/13
- [Octave-bug-tracker] [bug #39767] initial axes are not ordered properly, Ben Abbott, 2013/08/13
- [Octave-bug-tracker] [bug #39767] initial axes are not ordered properly, Rik, 2013/08/13
- [Octave-bug-tracker] [bug #39767] initial axes are not ordered properly, Ben Abbott, 2013/08/13
- [Octave-bug-tracker] [bug #39767] initial axes are not ordered properly, Rik, 2013/08/13
- [Octave-bug-tracker] [bug #39767] initial axes are not ordered properly, Ben Abbott, 2013/08/13
- [Octave-bug-tracker] [bug #39767] initial axes are not ordered properly, Rik, 2013/08/13
- [Octave-bug-tracker] [bug #39767] initial axes are not ordered properly,
Ben Abbott <=
- [Octave-bug-tracker] [bug #39767] findobj sorts list of returned handles, Rik, 2013/08/13
- [Octave-bug-tracker] [bug #39767] findobj sorts list of returned handles, Michael Godfrey, 2013/08/13
- [Octave-bug-tracker] [bug #39767] findobj sorts list of returned handles, Ben Abbott, 2013/08/13
- [Octave-bug-tracker] [bug #39767] findobj sorts list of returned handles, Ben Abbott, 2013/08/13
- [Octave-bug-tracker] [bug #39767] findobj sorts list of returned handles, Rik, 2013/08/13