kberger
Joined: 08 Nov 2018 Posts: 1
|
Posted: Thu Nov 08, 2018 9:35 am Post subject: Imported csv file plotting incorrect values |
|
|
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. |
|
DPlotAdmin Site Admin
![](images/avatars/12798672406543ad048b04c.png)
Joined: 24 Jun 2003 Posts: 2311 Location: Vicksburg, Mississippi
|
Posted: Fri Nov 09, 2018 6:46 pm Post subject: |
|
|
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 |
|