From: Allin C. <cot...@wf...> - 2018-08-12 17:45:26
|
It seems there's a small inaccuracy in the current (5.2.4) help for "missing". Here's the relevant part of the text: <quote> Gnuplot makes a distinction between missing data and invalid data (e.g. "NaN", 1/0.). For example invalid data causes a gap in a line drawn through sequential data points; missing data does not. Non-numeric characters found in a numeric field will usually be interpreted as invalid rather than as a missing data point unless they happen to match the `missing` string. </quote> In fact it seems that in a data block anything other than "NaN" (on a case-insensitive comparison) is treated as "missing" (in the operational sense that it does not produce a gap in a line plot), not invalid. Here's a little test script: set term pngcairo set output 'test.png' set nokey plot '-' using 1:2 w lines 2000 1 2001 2 2002 TEST_HERE 2003 2 2004 3 e The plot is drawn with a line from (2001,2) to 2003,2), and that remains the case if I put "?", ".", "NA" or "foo" in place of "TEST_HERE". A gap appears only if I substitute "nan" or equivalent. There's a practical consequence: if I'm in the habit of writing "?" for missing values in gnuplot input data, the doc would give me the idea that I could toggle "gaps in lines" behavior by inserting or removing set datafile missing "?" With this set I should get no gaps, without it I should get gaps. But get no gaps regardless. -- Allin Cottrell Department of Economics Wake Forest University, NC |