|
From: Daniel J S. <dan...@ie...> - 2006-08-07 04:13:05
|
Ethan A Merritt wrote: > On Sunday 06 August 2006 02:20 pm, Dmitri A. Sergatskov wrote: > >>I there any way I can get an old (4.0) behavior with new >>gnuplot when plotting data files with missing data? > > > Short answer: Yes. > plot 'test1.dat' using ($1):($2) with lines > > Longer answer: > > The whole "missing" issue drives me to distraction. > No two people expect the same thing from it, so it's no wonder > that many bug reports are filed against it. 3.7 and 4.0 did > not behave identically, so existing scripts are not an > infallible guide either. > > For what it's worth... > Your "NaN" strings *are* being read as legal IEEE format numbers. > Using "set datafile missing ..." is not the issue. > The issue is what to do when a number is not legal (NaN, Inf, > underflow). > Plot, or not plot? > Increment the line number, or not? > Error message? I agree. No one particular way of dealing with this will satisfy everybody. Hence I say it should be configurable. And doing so would really be a nice feature that users like. The problem with satisfying everyone right now is that there simply isn't enough variation in treating the data. Being so limited is the problem. We have expanded things a bit with DF_MISSING, but not enough. There should be 1) Enough variety to satisfy everyone. 2) And/or configurability. 3) Multiple definitions for the class of data type. We don't want to get so abstract that things become arcane, so lets go with say three types with some default behavior. Internally these would be DF_MISSING: Simply SKIP, no break between points DF_UNDEFINED: BREAK between points. DF_NAN: Don't know, also BREAK? Well, then we also allow some configurability with multiple definitions. That would be enough flexibility so that the user has more than one way of attacking this problem. S/he could add more strings to a data class or switch around strings in the definition of these classes, or configure the manner in which each class is treated. With a demo, the user should get the idea clearly. Dan |