bugGNU Octave - Bugs: bug #44409, Reparenting the current axes under...


bug #44409: Reparenting the current axes under an uipanel makes it not current

Submitter:  Pantxo Diribarne <pantxo>
Submitted:  Mon 02 Mar 2015 11:24:42 PM UTC
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup

Tue 14 Aug 2018 07:21:38 PM UTC, comment #2: 

I just tested with the development branch of Octave and this issue is still present.  I've marked the bug as confirmed and changed the Item Group to "Matlab Compatibility".

Frankly, Matlab's scheme is a little odd, but here is the annotated behavior.

clf;                        # creates new figure, "currentaxes" = []
hu = uipanel ();            # gcf "children" = hu
hax = gca ();               # gcf "children" = [hax; hu], "currentaxes" = hax
set (hax, "parent", hu);    # gcf "children" = hu, "currentaxes" = []
gca () == hax               # call to gca() creates new axes because "currentaxes" is [].

The reparenting operation would need to be changed not to delete the "currentaxes" property.  However, it would also have to be smart enough to understand when an axes is re-parented to another figure or a uipanel of another figure, in which case "currentaxes" does become [].  Oy, that's starting to seem cumbersome to implement.

Rik <rik5>
Group administrator
Fri 23 Dec 2016 08:26:03 PM UTC, comment #1: 

I think this behavior is still present in Octave 4.2.0.

When running the code sample from comment #0 I still get the result 0 (meaning "not equal").

Hartmut <hardy>
Mon 02 Mar 2015 11:24:42 PM UTC, original submission:  

From tests I asked for in the maintainers list [1] I understand that the following should not change the figure "currentaxes" property:

hu = uipanel ();
hax = gca ();
set (hax, "parent", hu);
gca () == hax

It works well if the axes is initialized with the uipanel as parent : "hax = axes ("parent", hu);".

[1] http://octave.1599824.n4.nabble.com/Query-for-project-on-improving-matrix-functions-td4668916.html

Pantxo Diribarne <pantxo>
Group Member


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

Attach Files:

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 rik5 (Posted a comment)
  • -email is unavailable- added by hardy (Posted a comment)
  • -email is unavailable- added by pantxo (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
    2018-08-14 rik5 Item GroupIncorrect Result Matlab Compatibility
        StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code