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 12 Feb 2014 09:43:11 PM UTC  
 
Category: Plotting with OpenGLSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: Ready For TestAssigned 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)

Sat 23 Aug 2014 02:55:19 PM UTC, 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 23 Aug 2014 01:20:59 PM UTC, 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 23 Aug 2014 11:09:57 AM UTC, 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 23 Aug 2014 11:07:50 AM UTC, comment #12:

Hi,

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 19 Aug 2014 05:06:54 PM UTC, 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 19 Aug 2014 02:42:32 PM UTC, 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 19 Aug 2014 02:14:56 PM UTC, 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 01 Aug 2014 05:50:25 AM UTC, 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 31 Jul 2014 09:46:20 PM UTC, 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 21 Feb 2014 04:11:55 PM UTC, 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 21 Feb 2014 11:01:31 AM UTC, 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 16 Feb 2014 10:32:46 AM UTC, 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 16 Feb 2014 12:01:21 AM UTC, comment #3:

does drawnow() help?

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

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

Pantxo Diribarne <pantxo>
Project Member
Thu 13 Feb 2014 05:31:15 AM UTC, 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 12 Feb 2014 09:43:11 PM UTC, 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):
   
   
Comment:
   

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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 23 Aug 2014 02:55:19 PM UTCpantxoStatusNone=>Ready For Test
      Open/ClosedOpen=>Closed
    Sat 23 Aug 2014 11:07:50 AM UTCpantxoAttached File-=>Added fix_new_currentaxes.patch, #31939
    Thu 31 Jul 2014 09:46:20 PM UTCandy1978Assigned toNone=>andy1978
    Sat 15 Feb 2014 08:50:27 PM UTCrik5SummaryReparented axes are not drawn =>Reparenting axes do not cause figure to be re-drawn

    Back to the top


    Powered by Savane 3.1-cleanup