bugGNU Octave - Bugs: bug #42362, isaxes returns wrong results

 
 

bug #42362: isaxes returns wrong results

Submitter:  Stefan Mahr <dac922>
Submitted:  Wed 14 May 2014 10:15:14 PM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
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
   

Thu 15 May 2014 03:20:04 PM UTC, comment #5: 

With your newer test I see the problem.  I amended your patch to test isaxes with [ax NaN] and pushed it to the stable branch here (http://hg.savannah.gnu.org/hgweb/octave/rev/4ca40b289b2c).  Closing report.

Rik <rik5>
Group administrator
Thu 15 May 2014 07:08:34 AM UTC, comment #4: 

isaxes([ax NaN]) should be more safe: http://inversethought.com/hg/octave-nkf/rev/d79dd5c464bf

Stefan Mahr <dac922>
Thu 15 May 2014 06:55:45 AM UTC, comment #3: 

Well, the test is not correct, since ishandle(0) returns 1. Try isaxes([ax 1.1]) instead.

Stefan Mahr <dac922>
Thu 15 May 2014 12:58:25 AM UTC, comment #2: 

The sample code already works for me without the patch.  I tested in 3.8.1 and on the development branch, and with gnuplot or fltk as the backend.


octave:1> figure()
octave:2> ax=axes
ax = -12.629
octave:3> isaxes([ax 0])
ans =

   1   0


Perhaps you could try running with '-f' so that no initial configuration files are read.  Also try 'which isaxes' to make sure the correct function is being called.

Rik <rik5>
Group administrator
Wed 14 May 2014 10:24:33 PM UTC, comment #1: 
Stefan Mahr <dac922>
Wed 14 May 2014 10:15:14 PM UTC, original submission:  

If the last arguments of isaxes input vector are not a axes, the output vector size if different from the input size.


figure()
ax=axes
isaxes([ax 0])
ans = 1


The correct result should be [1 0]

I figured out while trying to do a plotyy twice.

plotyy(1:4,rand(1:4),1:r:rand(1,4))
plotyy(1:4,rand(1:4),1:r:rand(1,4))


The first call works, the second fails. With correct isaxes, plotyy works for this case.

However, there're still some problems in conjunction with legend. The example from bug 41970 still works for the first call, but the second plotyy call fails again.

Stefan Mahr <dac922>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #31373:  isaxes.patch added by dac922 (977B - 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 dac922 (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-05-15 rik5 StatusWorks For Me Fixed
        Open/ClosedOpen Closed
    2014-05-15 rik5 StatusNone Works For Me
    2014-05-14 dac922 Attached File- Added isaxes.patch, #31373

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code