From: <pl...@pi...> - 2012-05-24 23:46:50
|
On 05/24/12 17:43, sfeam (Ethan Merritt) wrote: > On Thursday, 24 May 2012, pl...@pi... wrote: >> On 05/23/12 23:24, Ethan A Merritt wrote: > >>> gnuplot> help set datafile comment >>> The `set datafile commentschars` tells `gnuplot` what characters are used in a >>> data file to begin comment lines. If the first non-blank character on a line is >>> one of the specified characters then the rest of the input line is ignored. >>> Default value of the string is "#!" on VMS and "#" otherwise. >>> > >> OK, my bad, but this does point out something that could be done better. >> >> gnuplot> help set datafile comment >> >> but the following >> 1 # 3 4 >> produces rather unexpected plot unless >> set datafile missing '#' >> is specified as well. > > Er, what were you expecting? That is what gnuplot help said , not me. The help says it can produce "unexpected" results , so I suppose you'd better ask that question of the person who wrote the doc. I''ve already stated that I expected it skip the rest of the line as a comment. That would be useful. It appears that currently there is no facility have comments other than all plotted columns being already satisfied. It would be useful when data is missing to be able to add a comment saying why in the data file. eg. 21.05.12:23:20 96 72 65 22.05.12:09:00 98 # instrument failure on channels 2 and 3 23.05.12:04:30 120 87 49 > >> Unexpected indeed. Is there a good reason why this needs to happen? I >> suppose this falls into the category of "except in numbers" in 'help >> comment'. >> >> I often need to add a comment at the end of some data lines. This is OK >> if all expected columns are filled since gnuplot does not try to parse >> the rest. >> >> Is there a context in which a valid data entry could begin with '#' ? > > Sure - why not? > Data files can contain anything at all, not necessarily numeric. > Yeah well, assuming that it is something that is going to be plotted it has to be numerical somewhere along the way. You can't plot "hash" . Unless # can be part of a numeric input , or valid data is some other way , I see no utility in not parsing it as indicating a comment and ending parsing the line for data. Am I missing something useful? Peter. |