|
From: David L. <da...@la...> - 2015-01-10 02:21:49
|
On Fri, 9 Jan 2015, Ethan A Merritt wrote: > On Friday, 09 January 2015 02:14:27 PM David Lang wrote: >> I ran into a case that worked with v4.x that doesn't work with v5, namely when >> plotting points from a file where the x column is a timestamp and the file had >> column headers, v4 seems to have ignored the header column (apparently deciding >> that the timestamp was invalid and so throwing out the entire line), while v5 >> interprets the timestamp as 01-01-0000 and scaleing the entire plot to include >> this date. > > There are a number of things you could do. > > 1) You could tell gnuplot that the first line contains column headers: > > set key autotitle columnhead > > 2) You could tell it to skip the first line of the file > > plot 'foo' skip 1 using ... > > 3) You could explicitly filter out 0 times from the input > > plot 'foo' using ($1 == 0 ? NaN : timecol(1)): ... > > Possibly other alternatives as well. In my case I changed the data fetching routine to filter out the column headers from the file. I just was surprised when the plot that was working on my production system didn't work on my desktop (where I had installed 5.0). If this wasn't something that worked on the older versions, I would just shrug it off as "don't do that", but the fact that it broke a working config made me post about it. David Lang |