bugGNU Octave - Bugs: bug #37752, doing set(gca, "parent",...

 
 

bug #37752: doing set(gca, "parent", gcf) repeatedly changes figure

Submitter:  Muhali <muhali>
Submitted:  Thu 15 Nov 2012 04:45:53 PM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 13 Feb 2014 05:43:12 AM UTC, comment #8: 

It works for me.  Closing report.

Rik <rik5>
Group administrator
Wed 12 Feb 2014 11:04:35 PM UTC, comment #7: 

I took a quick look at the patch.  Looks like a nice and simple fix.  Thanks.

http://hg.savannah.gnu.org/hgweb/octave/rev/0cbd0d285541


Ben Abbott <bpabbott>
Group Member
Wed 12 Feb 2014 09:30:49 PM UTC, comment #6: 

Pantxo,

Your patch works for me.


test graphics.cc
2014-02-12 16:27:47.685 octave-cli[31114:d0f] CoreText performance note: Client called CTFontCreateWithName() using name "Arial" and got font with PostScript name "ArialMT". For best performance, only use PostScript names when calling this API.
2014-02-12 16:27:47.685 octave-cli[31114:d0f] CoreText performance note: Set a breakpoint on CTFontLogSuboptimalRequest to debug.
PASSES 22 out of 22 tests



Ben Abbott <bpabbott>
Group Member
Wed 12 Feb 2014 08:52:13 PM UTC, comment #5: 

Hi, attached is a patch that avoids the problem (but doesn't say why reparent doesn't work).
I've also added the suggested test.


(file #30527)

Pantxo Diribarne <pantxo>
Group Member
Sat 15 Dec 2012 04:46:08 AM UTC, comment #4: 

Once Jordi fixes this bug, perhaps a test should be added to avoid reversion?


%!test
%! hf = figure ("visible", "off");
%! unwind_protect
%!   hax = gca ();
%!   set (hax, "parent", gcf ())
%!   assert (gca (), hax)
%! unwind_protect_cleanup
%!   close (hf);
%! end_unwind_protect


Ben Abbott <bpabbott>
Group Member
Sat 15 Dec 2012 01:45:27 AM UTC, comment #3: 

Simpler version


close all
sombrero
set (gca, "parent", gcf);
get (gcf (), "currentaxes")
ans = [](0x0)


I don't have time to check at the moment, but might this be related to the changeset below?

http://hg.savannah.gnu.org/hgweb/octave/rev/1ac3c906990a

Ben Abbott <bpabbott>
Group Member
Sat 15 Dec 2012 12:57:08 AM UTC, comment #2: 

Calling gca() after setting  "parent" creates the second axes.


close all
sombrero
gca ()
ans = -11.558
set (gca, "parent", gcf);
gca ()
ans = -5.1255



Ben Abbott <bpabbott>
Group Member
Thu 15 Nov 2012 04:59:00 PM UTC, comment #1: 

This is decidedly weird. Try using fltk and rotating the plot. This seems to create two axes objects and reassigns to each other the parentage?

Jordi GutiƩrrez Hermoso <jordigh>
Group Member
Thu 15 Nov 2012 04:45:53 PM UTC, original submission:  

When doing


sombrero;
set(gca, "parent", gcf);
set(gca, "parent", gcf);
...


the figure keeps changing.

Muhali <muhali>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #30527:  reparentaxes_bug37752.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 rik5 (Posted a comment)
  • -email is unavailable- added by pantxo (Updated the item)
  • -email is unavailable- added by bpabbott (Posted a comment)
  • -email is unavailable- added by jordigh (Posted a comment)
  • -email is unavailable- added by muhali (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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-02-13 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2014-02-12 bpabbott StatusConfirmed Ready For Test
    2014-02-12 pantxo Attached File- Added reparentaxes_bug37752.patch, #30527
    2012-12-15 bpabbott Operating SystemGNU/Linux Any
    2012-11-15 jordigh StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code