DPlot Forum Index DPlot
http://www.dplot.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Imported csv file plotting incorrect values

 
Post new topic   Reply to topic    DPlot Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
kberger



Joined: 08 Nov 2018
Posts: 1

PostPosted: Thu Nov 08, 2018 9:35 am    Post subject: Imported csv file plotting incorrect values Reply with quote

When I import a csv file with some very small numbers (see below), instead of plotting the first column against the second I get a plot of the line number against the first column. I've tried importing the file via drag and drop, as well as just copy-pasting the values. The issue seems to go away if I replace the very small values with 0 and I can certainly keep that in mind for the future, but this seems like very odd behavior. I tried replacing just some of the values with 0, and eventually I can get it to import correctly with a few of these non-zero values but the actual number seems inconsistent. I'm on version 2.3.5.7.

0,0
0.01,7.77313e-320
0.02,1.55433e-319
0.03,2.33115e-319
0.04,3.10772e-319
0.05,3.884e-319
0.06,4.65993e-319
0.07,5.43546e-319
0.08,6.21055e-319
0.09,6.98515e-319
0.1,7.7592e-319
0.11,8.53266e-319
0.12,9.30548e-319
0.13,1.00776e-318
0.14,1.0849e-318
0.15,1.16196e-318
0.16,1.23893e-318
0.17,1.31582e-318
0.18,1.39261e-318
0.19,1.46931e-318
0.2,1.54591e-318
0.21,1.62241e-318
0.22,1.6988e-318
0.23,1.77507e-318
0.24,1.85122e-318
0.25,1.92726e-318
0.26,2.00316e-318
0.27,2.07893e-318
0.28,2.15456e-318
0.29,2.23005e-318
0.3,2.30539e-318
0.31,2.38058e-318
0.32,2.45561e-318
0.33,2.53048e-318
0.34,2.60518e-318

Thanks for the help.
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Fri Nov 09, 2018 6:46 pm    Post subject: Reply with quote

You've run into the limits of double precision (8 byte) floating point numbers. The smallest number that can be represented is ~1.1E-308.

Rather than trying to parse numbers in text files (which would slow the file-reading process to a crawl), DPlot reads those text representations of numbers directly into... well, numbers. So the results in your case will at best be unpredictable. I'm actually surprised it didn't crash.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    DPlot Forum Index -> Bug Reports All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group