bugGNU Octave - Bugs: bug #50495, Plot not correct for...

 
 

bug #50495: Plot not correct for "large" numbers

Submitter:  None
Submitted:  Wed 08 Mar 2017 06:31:03 PM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Inaccurate Result
Status:  Duplicate Assigned to:  None
Originator Name:  Tyler Ryan Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.2.1
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 09 Mar 2017 05:18:02 AM UTC, comment #3: 

This is a duplicate.  Closing report.

Use the eps function to check what machine precision is.  In this case,


x = single (2e7);
eps (x)
ans =  2


And the example code is using a step size in x of 1 which is below this value, and hence unrecognized.



Rik <rik5>
Group administrator
Wed 08 Mar 2017 07:43:37 PM UTC, comment #2: 

Sorry, I should have mentioned this is the opengl toolkit.

I originally asked on the irc channel and jwe mentioned the single precision bugs reports already filed but the values I'm using (2e7) should be well within the range of a single.

Anonymous
Wed 08 Mar 2017 07:37:38 PM UTC, comment #1: 

What graphics toolkit do you use?

Type
graphics_toolkit
at the Octave prompt and report back.

I suspect this is due to the OpenGL toolkits (qt and fltk) using single rather than double precision.
If so this bug report is a duplicate of several others, e.g.,
bug #32980.

Philip Nienhuis <philipnienhuis>
Group Member
Wed 08 Mar 2017 06:31:03 PM UTC, original submission:  

Running the below scrip produces and graph where the lines and markers don't match.


clear all
start = 2e7;
x = start:(start+10);
y = 0:10;
figure(1); clf
plot(x,y, 'x-', 'MarkerSize', 10);


I do get the expected output (lines go through markers) if I change the x values to be 0:10;

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #39944:  Figure 1_001.png added by None (15KiB - image/png - Example of figure output)

 

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 None (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
    2017-03-09 rik5 StatusNeed Info Duplicate
        Open/ClosedOpen Closed
    2017-03-08 philipnienhuis StatusNone Need Info
    2017-03-08 None Attached File- Added Figure 1_001.png, #39944

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code