bugGNU Octave - Bugs: bug #44394, graphics_toolkit check assumes...

 
 

bug #44394: graphics_toolkit check assumes axes is directly under figure

Submitter:  -X- <jsh>
Submitted:  Sun 01 Mar 2015 06:54:08 AM 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
   

Sun 01 Mar 2015 07:19:58 PM UTC, comment #4: 

Okay.  It was my thought too that these functions would not be used intensively, and thus wouldn't present much of a performance issue.

Rik <rik5>
Group administrator
Sun 01 Mar 2015 06:38:16 PM UTC, comment #3: 

You are right but I don't think that there are any such case in the modified files: axes can always have an uipanel parent between them and their ancestor figure.

I don't think the modified files are meant to be used intensively so I don't expect a significant slowdown.

Pantxo Diribarne <pantxo>
Group Member
Sun 01 Mar 2015 06:24:40 PM UTC, comment #2: 

Something to be aware of, ancestor() is much slower than using 'get (h, 'parent').  So if there are any cases where it is absolutely certain that the parent will be a figure it would be preferable to keep that syntax.

Rik <rik5>
Group administrator
Sun 01 Mar 2015 02:25:09 PM UTC, comment #1: 

Hi,

Thanks for your bug report. I have pushed a changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/f25fe5369022) in which I tried to find all occurrences of this assumption and use "ancestor" to find the figure ancestor.

Closing bug report.

Pantxo Diribarne <pantxo>
Group Member
Sun 01 Mar 2015 06:54:08 AM UTC, original submission:  


in axis.m line 196:

if (strcmp (get (get (ca, "parent"), "__graphics_toolkit__"), "gnuplot"))

assumes that the axes is a child of the figure which now nay not necessarily be true, for example this fails:


h  = uipanel;
ax = axes( 'parent', h );
axis( ax, 'equal )


Line 196 in axis.m should possibly be change to a recursive or better check mechanism. There could possibly also be other places where this will fail.

-X- <jsh>

 

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

Attach Files:
   
   
Comment:
   

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 pantxo (Posted a comment)
  • -email is unavailable- added by jsh (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-03-01 pantxo CategoryGUI Plotting
        StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code