bugGNU Octave - Bugs: bug #37553, datetick generates strange tick...

 
 

bug #37553: datetick generates strange tick mark locations

Submitted by:  None
Submitted on:  Thu 11 Oct 2012 11:46:18 PM UTC  
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Inaccurate Result
Status:  Duplicate Assigned to:  None
Originator Name:  dkruger Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  3.6.2
Operating System:  Microsoft Windows

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

Tue 16 Oct 2012 11:27:59 PM UTC, comment #3: 

Sad to say, the root cause of this is that OpenGL uses single (32-bit) rather than double (64-bit) values in the backend.  This was reported in bug #32980.  The current work-around is to use gnuplot.

To see the problem, try

diff (single (t))
ans =

   0.0000000000000000
   0.0625000000000000
   0.0625000000000000
   0.0000000000000000
   0.0625000000000000
   0.0625000000000000
   0.0000000000000000
   0.0625000000000000
   0.0625000000000000
   0.0000000000000000
   0.0625000000000000
   0.0625000000000000
   0.0000000000000000

You can see that because of the limited precision of the single class there is occasionally no difference between two datetick values.

Rik <rik5>
Project Administrator
Tue 16 Oct 2012 11:07:13 PM UTC, comment #2: 

yes, I was using FLTK.  I only found out about switching afterwards.  Next time I will report a bug specifically.

Dov Kruger <dkruger>
Fri 12 Oct 2012 03:42:08 AM UTC, comment #1: 

Offhand, are you using FLTK or gnuplot for plotting?  gnuplot seems to work, FLTK seems broken.

Rik <rik5>
Project Administrator
Thu 11 Oct 2012 11:46:18 PM UTC, original submission:  

I built a small data file to demonstrate datetick.  Data is plotted for October 10, 2012 at hours from 0100 to 1300.  Here is the data:

2012 10 9 01 00 00 47
2012 10 9 02 00 00 46.5
2012 10 9 03 00 00 45
2012 10 9 04 00 00 45.2
2012 10 9 05 00 00 45.3
2012 10 9 06 00 00 46
2012 10 9 07 00 00 46.5
2012 10 9 08 00 00 47.6
2012 10 9 09 00 00 48.2
2012 10 9 10 00 00 49.8
2012 10 9 11 00 00 51.2
2012 10 9 12 00 00 53.5
2012 10 9 13 00 00 54.7
2012 10 9 14 00 00 56.9

The following code generates a graph that shows
m=load("temp20121009.dat");
t = datenum(m(:,1:6));

this generates the following Julian dates.  The differences look fine, an hour is 0.04166666
   735151.041666667
   735151.083333333
   735151.125000000
   735151.166666667
   735151.208333333
   735151.250000000
   735151.291666667
   735151.333333333
   735151.375000000
   735151.416666667
   735151.458333333
   735151.500000000
   735151.541666667
   735151.583333333

However, when plotted:
plot(t, m(:,7))
the numbers generate odd spacing.  They are all equally spaced.
Seems like a bug in the autoselection of tick locations.

This problem does not happen with integral number of days.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Updated the item)
  • -email is unavailable- added by dkruger (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-05-05 mtmiller CategoryPlotting => Plotting with OpenGL
        Item GroupNone => Inaccurate Result
        Open/ClosedOpen => Closed
    2012-10-16 rik5 StatusNeed Info => Duplicate
        Dependencies- => Depends on bugs #32980
    2012-10-12 rik5 StatusNone => Need Info

    Back to the top


    Powered by Savane 3.5