octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

question about ordering of visible/hidden children in graphics objects (


From: John W. Eaton
Subject: question about ordering of visible/hidden children in graphics objects (was: rearranging 'children' in a graphics handle)
Date: Wed, 10 Feb 2010 10:06:43 -0500

In a thread on the bug list on 9-Feb-2010, John W. Eaton wrote:

| On  9-Feb-2010, E. Joshua Rigler wrote:
| 
| | The following should work if there are multiple 'children' handles
| | defined in the current graphics handle:
| | 
| | plot(1);
| | h = get(gca,'children');
| | hp = shift(h,1);
| | set(gca,'children', hp);
| | 
| | I get the error "set: new children must be a permutation of existing
| | children" when I attempt this.
| | 
| | The pertinent function in the file graphics.cc seems to be
| | maybe_set_children.  The old and new 'children' vectors are called
| | 'kids' and 'new_kids' respectively.  They are each sorted, then
| | compared.  If one is a permutation of the other, the sorted versions
| | of each should match, but for some reason this isn't working.  This
| | seems like such a basic operation, I can't imagine what is going
| | wrong.  Any suggestions?
| | 
| | For context, this was discovered in an effort to get the free ML
| | mapping toolbox M_Map to work under Octave.
| 
| The problem is that an axes object normally has hidden children that
| you are not seeing when you do
| 
|   get (gca, 'children');
| 
| and that the maybe_set_children function was not handling either.
| 
| I checked in the following change.
| 
|   http://hg.savannah.gnu.org/hgweb/octave/rev/4b124317dc38

In my change, after setting the children for a graphics object, all
the visible children will be first in the list and all the hidden
children will be at the end.  Is this the correct behavior?  Is it
possible for the hidden children to be mixed with the visible
children prior to such a rearrangement?  If so, then should we be
preserving the ordering/mixing of the visible/hidden children in the
list?

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]