bugGNU Octave - Bugs: bug #63117, Reordering axes children deletes...


bug #63117: Reordering axes children deletes labels and title

Submitter:  Pantxo Diribarne <pantxo>
Submitted:  Tue 27 Sep 2022 09:31:32 PM UTC
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 7.2.0 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:


Mon 17 Oct 2022 12:35:50 PM UTC, comment #4: 

Thanks for the fix.
Works for me now.

Closing report.

Markus M├╝tzel <mmuetzel>
Project Member
Wed 28 Sep 2022 08:10:59 PM UTC, comment #3: 

@jwe: Thanks clarifying. Your simple change would fix the issue but I pushed the patch which I think improves readability and avoids an unnecessary temporary variable:


Marking ready for test.

Pantxo Diribarne <pantxo>
Project Member
Tue 27 Sep 2022 10:12:58 PM UTC, comment #2: 

Matrix::stack is a const method that returns a newly constructed object so A.stack (B) returns a new object.  It's similar to doing [A; B].  The original probably should have been tmp = tmp.stack (get_hidden ());

John W. Eaton <jwe>
Project Administrator
Tue 27 Sep 2022 09:39:31 PM UTC, comment #1: 

I attached a patch that fixes the issue for me. I am not sure why the original version, using Matrix::stack, did not work though...

(file #53762)

Pantxo Diribarne <pantxo>
Project Member
Tue 27 Sep 2022 09:31:32 PM UTC, original submission:  

See the following example:

clf; hold on
hl1 = plot (1:10, "linewidth", 5)
hl2 = plot (10:-1:1, "linewidth", 5)
ht = title ("Here is a title");
hkids = get (gca, "children") ## returns only the line handles
allchild (gca)
set (gca, "children", flipud (hkids)) ## title disappears!
get (gca, "children")
allchild (gca)

This should switch line order (which it does) but I would certainly not expect that it deletes labels and title.

Pantxo Diribarne <pantxo>
Project Member


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

Attach Files:

Attached Files
file #53762:  bug63117.patch added by pantxo (2KiB - text/x-patch)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by jwe (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 project members can vote.





    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-10-17 mmuetzel StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2022-09-28 pantxo StatusPatch Submitted Ready For Test
    2022-09-27 pantxo StatusNone Patch Submitted
    2022-09-27 pantxo Attached File- Added bug63117.patch, #53762

    Back to the top

    Powered by Savane 3.9