bugGNU Octave - Bugs: bug #36122, Datetick throws errors for some...

 
 

bug #36122: Datetick throws errors for some axis range

Submitter:  Julien Salort <jsalort>
Submitted:  Sat 07 Apr 2012 12:19:29 PM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  jordigh
Originator Name:  Julien Salort Open/Closed:  * Closed
Release:  * 3.6.1 Operating System:  * Mac OS
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 21 May 2012 11:24:29 AM UTC, comment #5: 
John W. Eaton <jwe>
Group administrator
Mon 21 May 2012 11:23:18 AM UTC, comment #4: 
John W. Eaton <jwe>
Group administrator
Sun 20 May 2012 11:07:20 PM UTC, comment #3: 

In fact matlab accepts fractional month and I suppose we should too. I fixed this issue differently in the chanageset 4f458e882516

D.

David Bateman <dbateman>
Group Member
Fri 11 May 2012 01:58:44 PM UTC, comment #2: 

Apparently the reason is that the calculation of the separation between ticks can lead to fractional month value. I propose to add a test in datenum.m to throw a more explicit error in case month value is fractional and a slight correction to datetick to avoid fractional month values.

(file #25836, file #25837)

Julien Salort <jsalort>
Tue 10 Apr 2012 06:10:02 PM UTC, comment #1: 

Confirmed at revision 14542:bf219932bf3e. Would you like to attempt to debug this yourself?

Jordi GutiƩrrez Hermoso <jordigh>
Group Member
Sat 07 Apr 2012 12:19:29 PM UTC, original submission:  

Some date ranges cause datetick to throw an error.

The following throws an error:

t=linspace(734869,734966,80);
plot(t,sin(t))
datetick("dd/mm/yy","keeplimits")


The error is:

error: datenum: subscript indices must be either positive integers or logicals
error: called from:
error:   /opt/local/share/octave/3.4.3/m/time/datenum.m at line 110, column 5
error:   /opt/local/share/octave/3.4.3/m/time/datetick.m at line 183, column 14
error:   /opt/local/share/octave/3.4.3/m/time/datetick.m at line 42, column 5


The following does not throw an error:

t=linspace(734869,734900,80);
plot(t,sin(t))
datetick("dd/mm/yy","keeplimits")


Julien Salort <jsalort>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #25836:  datenum.m.patch added by jsalort (156B - application/octet-stream)
file #25837:  datetick.m.patch added by jsalort (295B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by dbateman (Posted a comment)
  • -email is unavailable- added by jordigh (Posted a comment)
  • -email is unavailable- added by jsalort (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 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-05-20 dbateman StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2012-05-11 jordigh StatusConfirmed Patch Submitted
        Assigned toNone jordigh
    2012-05-11 jsalort Attached File- Added datenum.m.patch, #25836
        Attached File- Added datetick.m.patch, #25837
    2012-04-10 jordigh StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code