bugGNU Octave - Bugs: bug #49766, ezplot of constant fcn fails:...

 
 

bug #49766: ezplot of constant fcn fails: error: axis: LIMITS(3) must be less than LIMITS(4)

Submitted by:  Colin Macdonald <cbm>
Submitted on:  Mon 05 Dec 2016 07:11:03 AM UTC  
 
Category: PlottingSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Mon 12 Dec 2016 02:51:44 PM UTC, comment #5:

I fixed ezplot on the development branch here (http://hg.savannah.gnu.org/hgweb/octave/rev/9b096bffc10d). Closing report.

Rik <rik5>
Project Administrator
Wed 07 Dec 2016 05:49:38 PM UTC, comment #4:

Error,

Colin Macdonald <cbm>
Mon 05 Dec 2016 10:04:38 PM UTC, comment #3:

@Colin: Could you check another thing on Matlab?

Does it issue a warning or error on the call to ylim? Does it ignore the equal upper/lower bound and set the ylim to 2 +/- 1?

Rik <rik5>
Project Administrator
Mon 05 Dec 2016 06:35:33 PM UTC, comment #2:

Matlab: "ezplot(@(x) c)" seems to have ylim of [c-1 c+1].

Too bad Savannah doesn't allow tagging "easyfix" or something... Can you prepend "[easytag]" to the subject? Doesn't look like I can.

Having such a list seems like a good way to attract talent!

Colin Macdonald <cbm>
Mon 05 Dec 2016 04:41:31 PM UTC, comment #1:

What are the limits in Matlab after executing ezplot for the sample?

This is easy to fix. The issue is in _ezplot_.m where Octave finds the limits of the data and then calls axis. But if the data is constant then the upper and lower limits for one of the axes are the same and the axis() function issues an error.

Rik <rik5>
Project Administrator
Mon 05 Dec 2016 07:11:03 AM UTC, original submission:

If you don't vectorize, you get a slightly different error:

Both work in Matlab and DTRT.

Colin Macdonald <cbm>

 

(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 rik5 (Posted a comment)
  • -unavailable- added by cbm (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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 12 Dec 2016 02:52:03 PM UTCrik5Open/ClosedOpen=>Closed
    Mon 12 Dec 2016 02:51:44 PM UTCrik5StatusConfirmed=>Fixed
    Mon 05 Dec 2016 04:41:31 PM UTCrik5StatusNone=>Confirmed
      Operating SystemGNU/Linux=>Any

    Back to the top


    Powered by Savane 3.1-cleanup1