bugGNU Octave - Bugs: bug #35662, Using default arguments for axis...

 
 

bug #35662: Using default arguments for axis properties causes error

Submitted by:  Muhali <muhali>
Submitted on:  Tue 28 Feb 2012 10:56:32 PM UTC  
 
Category: Plotting with OpenGLSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sun 28 Dec 2014 01:54:08 AM UTC, comment #4:

Somewhere in the past two years this has been fixed. The example code now runs on the development branch of Octave. This was with a tip from Dec. 23rd, 2014 (eee9f111c164). Closing report.

Rik <rik5>
Project Administrator
Fri 02 Mar 2012 07:30:34 PM UTC, comment #3:

Actually, this is a general problem with all the update_XXX functions which don't just set a variable but call other update_XXX functions. I'm going to re-title the bug to reflect that.

Here is another example

The issue is that when the axis is being constructed it overrides the defaults by calling set_XXX with the new default. This function call is done before any other axis setup has been done and so the set_XXX functions which rely on having an existing axis fail.

One obvious solution would be to build the axis, and then set all the defaults. This would obviously have a lot of redundancy as an axis was set up with multiple properties which then needed to be changed.

A second idea would be to code some signaling variable, such as building_axes, which updating functions would check before calling the update function.

For example, Here is the code for the set_ticklength function

And here it is with the proposed change

It's still a hack, but right now Octave is broken for several properties that one can set defaults on.

Rik <rik5>
Project Administrator
Wed 29 Feb 2012 07:18:22 PM UTC, comment #2:

This was likely introduced by my changeset below.

http://hg.savannah.gnu.org/hgweb/octave/rev/c9ec21bef97a

Which as a fix for the bug below

https://savannah.gnu.org/bugs/?35438

Rik recently pushed a related changeset as well

http://hg.savannah.gnu.org/hgweb/octave/rev/e41e538e9d03

Ben Abbott <bpabbott>
Project Member
Wed 29 Feb 2012 06:58:06 PM UTC, comment #1:

Confirmed on a recent tip (2/29/12).

Rik <rik5>
Project Administrator
Tue 28 Feb 2012 10:56:32 PM UTC, original submission:

This code

results in the following error:

error: _go_axes_: operator *: nonconformant arguments (op1 is 0x0, op2 is 4x1)
error: called from:
error: /tmp/octave-3.7/share/octave/3.7.0+/m/plot/axes.m at line 39, column 9
error: /tmp/octave-3.7/share/octave/3.7.0+/m/plot/gca.m at line 45, column 9
error: /tmp/octave-3.7/share/octave/3.7.0+/m/plot/__plt_get_axis_arg__.m at line 64, column 11
error: /tmp/octave-3.7/share/octave/3.7.0+/m/plot/plot.m at line 186, column 25
error: /tmp/foo.m at line 3, column 1

Muhali <muhali>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bpabbott (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by muhali (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
    Sun 28 Dec 2014 01:54:08 AM UTCrik5StatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Fri 02 Mar 2012 07:30:34 PM UTCrik5Summaryset ticklength breaks plot=>Using default arguments for axis properties causes error
    Wed 29 Feb 2012 06:58:06 PM UTCrik5CategoryNone=>Plotting with OpenGL
      StatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1