bugGNU Octave - Bugs: bug #41573, Reparenting axes do not cause...


bug #41573: Reparenting axes do not cause figure to be re-drawn

Submitted by:  Pantxo Diribarne <pantxo>
Submitted on:  Wed Feb 12 21:43:11 2014  
Category: Plotting with OpenGLSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: Andreas Weber <andy1978>
Originator Name: Open/Closed: Closed
Release: devOperating System: Any

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


(Jump to the original submission Jump to the original submission)

Thu Sep 4 14:26:40 2014, comment #16:

@Pantxo: Works fine for me, thank you again. Closing this report as fixed

Andreas Weber <andy1978>
Project MemberIn charge of this item.
Sat Aug 23 14:55:19 2014, comment #15:

@Andy: I have pushed the changeset augmented with a %!test (http://hg.savannah.gnu.org/hgweb/octave/rev/4c59f69fa52c). The original example now works me with both opengl toolkits. If it works for you, you may close the bug report.

Pantxo Diribarne <pantxo>
Project Member
Sat Aug 23 13:20:59 2014, comment #14:

@Pantxo: Thank you for your patch. I haven't had time to write a patch myself so I'm very pleased you did it :-)

Please go ahead and push it.

Andreas Weber <andy1978>
Project MemberIn charge of this item.
Sat Aug 23 11:09:57 2014, comment #13:

Sorry, I've just seen that the bug was assigned to Andy. Don't take my previous post into account.

Pantxo Diribarne <pantxo>
Project Member
Sat Aug 23 11:07:50 2014, comment #12:


Following Andy's suggestion, I produced a patch. If it works for you I can push it.

(file #31939)

Pantxo Diribarne <pantxo>
Project Member
Tue Aug 19 17:06:54 2014, comment #11:

@Andy: I think your analysis is correct. Octave shouldn't leave the currentaxes property set to null after the reparenting.

Rik <rik5>
Project Administrator
Tue Aug 19 14:42:32 2014, comment #10:

In Matlab "get(1, "currentaxes")" returns ax in the code from comment 9. I think we should fix this in graphics.cc/graphics.in.h.

Matlab result: http://octave.1599824.n4.nabble.com/Matlab-test-requested-tp4666120p4666121.html

Andreas Weber <andy1978>
Project MemberIn charge of this item.
Tue Aug 19 14:14:56 2014, comment #9:

@Rik: Thank you for your explanation. The reason for this behaviour is that the property currentaxes for figure 1 is still empty after the parent is changed:

Is it okay that figure 1 "currentaxes" is empty after "set (ax, "parent", 1)" ?

Andreas Weber <andy1978>
Project MemberIn charge of this item.
Fri Aug 1 05:50:25 2014, comment #8:

@Andy: The bug is that the plot isn't redrawn without explicitly clicking on the canvas. I just checked with cset 19cb2530c16b and the issue issue is still there.

Rik <rik5>
Project Administrator
Thu Jul 31 21:46:20 2014, comment #7:

@Pantxo: I made some bigger changes to the fltk toolkit and if I try your code on default

I see the plot hiding from figure 2 and appearing on figure 1 as soon as I click on figure (1). Thank you, Andy

Andreas Weber <andy1978>
Project MemberIn charge of this item.
Fri Feb 21 16:11:55 2014, comment #6:

Pantxo, could you send the request to split the "Plotting with OpenGL" category directly to jwe@octave.org. I believe he is the only one at the moment who can change those fields.

Rik <rik5>
Project Administrator
Fri Feb 21 11:01:31 2014, comment #5:

Using qt graphics toolkit the axes is redrawn properly after reparenting.

The bug category "Plotting with OpenGL" should probably be split into "... with FLTK" and "... with qt", now that qt graphics toolkit has been integrated to octave sources.

Pantxo Diribarne <pantxo>
Project Member
Sun Feb 16 10:32:46 2014, comment #4:

Neither drawnow, nor _fltk_redaw_ have an effect:

Only clicking on the figure (1) canvas as an effect.

Pantxo Diribarne <pantxo>
Project Member
Sun Feb 16 00:01:21 2014, comment #3:

does drawnow() help?

Felipe G. Nievinski <fgnievinski>
Thu Feb 13 07:17:41 2014, comment #2:

You are right, clicking in the canvas area lets the axes be drawn.

Pantxo Diribarne <pantxo>
Project Member
Thu Feb 13 05:31:15 2014, comment #1:

Are they not drawn, or simply not refreshed?

The code works for me if I explicity click in the blank canvas of the figure. This seems to be an issue with the OpenGL renderer not understanding that the figure has been invalidated and needs to be refreshed. This worked for me

Rik <rik5>
Project Administrator
Wed Feb 12 21:43:11 2014, original submission:

See example below :

The axes is valid, I've tried to change its properties, draw lines ... all "silently" (invisibly) works but I can't get it to be drawn.

Pantxo Diribarne <pantxo>
Project Member


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

Attach File(s):

Attached Files
file #31939:  fix_new_currentaxes.patch added by pantxo (1kB - application/x-download)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by andy1978 (Posted a comment)
  • -unavailable- added by fgnievinski (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by pantxo (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu Sep 4 14:26:40 2014andy1978StatusReady For Test=>Fixed
    Sat Aug 23 14:55:19 2014pantxoStatusNone=>Ready For Test
    Sat Aug 23 11:07:50 2014pantxoAttached File-=>Added fix_new_currentaxes.patch, #31939
    Thu Jul 31 21:46:20 2014andy1978Assigned toNone=>andy1978
    Sat Feb 15 20:50:27 2014rik5SummaryReparented axes are not drawn =>Reparenting axes do not cause figure to be re-drawn

    Back to the top

    Powered by Savane 3.1-cleanup1