|
From: <pl...@pi...> - 2016-06-14 16:25:21
|
On 14/06/16 12:52, Allin Cottrell wrote: > On Tue, 14 Jun 2016, pl...@pi... wrote: > >> On 14/06/16 09:43, pl...@pi... wrote: >>> >>> I have a data csv datafile which uses -99.99 as it missing data value. >>> >>> with the following settings the 'missing' data are getting plotted. >>> >>> set datafile separator "," >>> set datafile missing "-99.99" >>> >>> >>> show datafile missing >>> >>> "-99.99" in datafile is interpreted as missing value >>> >>> >>> As a wild guess I tried the following and the missing data now get >>> correctly removed. >>> >>> set datafile missing "-99.99," >>> >>> >>> This seems to be an illogical order of parsing. >>> >>> Surely the data line needs to be parsed into its constituent data >>> columns before trying to detect the missing data string. >>> >>> Regards, Peter >>> >>> >>> gnuplot> show version >>> >>> G N U P L O T >>> Version 5.0 patchlevel 1 last modified 2015-06-07 >>> >>> Copyright (C) 1986-1993, 1998, 2004, 2007-2015 >>> Thomas Williams, Colin Kelley and many others >>> >>> gnuplot home: http://www.gnuplot.info >>> faq, bugs, etc: type "help FAQ" >>> immediate help: type "help" (plot window: hit 'h') >>> >>> >>> >> >> Just to complete this here is a sample line from the file displaying >> this bug. >> >> 1958, 06, 21351, 1958.4548, -99.99, -99.99, 317.25, 315.14, >> 317.25, 315.14 > > Doesn't it invite undefined behavior if you set "," as separator but > then also include spaces between the values? > > Allin Cottrell > I'm not including anything, I have some data provided that I need to plot with gnuplot. I've always found gnuplot smart enough to deal with most things that I've thrown at it. If this is not a bug I could always preprocess the data to remove the commas. The question remains as to whether this is a bug or not. The fourth field in that line is " -99.99" when using comma separator. This data is supplied with a missing VALUE of -99.99 . Will this match gnuplot's datafile missing defined as a string "-99.99" ? That depends upon how the equality test is done in a language that has fuzzy variable types. But that does not account for the behaviour of it working with datafile missing set to "-99.99," That seems to clearly indicate that there is logical problem here. The comma should no longer be there in the data field since it is the field separator. Peter. |