0
votes

I'm trying to plot time series data from a csv file but always get an error that says "all points y value undefined!" I'm not sure what I'm doing wrong with the following commands I issue

set datafile separator ','
set xdata time
set timefmt '%m/%d/%Y %H:%M:%S'               
set format x '%H:%M'
set autoscale y
set xrange ['07/01/2014':'07/10/2014']
plot 'data.csv' u 3:4 w lines

the data in the csv file looks like below

sensor name,server name,2014-07-01 20:11:48,16.44954,V,valuetype
sensor name,server name,2014-07-01 20:12:08,16.48951,V,valuetype
sensor name,server name,2014-07-01 20:12:18,16.53948,v,valuetype
1

1 Answers

1
votes

The problem is with how you've defined your timefmt in the gnuplot script versus how it is actually in the data file:

You will need to change timefmt so that it matches that in your data file

set timefmt '%Y-%m-%d %H:%M:%S' 

And then set xrange similarly. Following is tailored to the data you've provided. You may change the values to suite your complete data:

set xrange ['2014-07-01 20:11:00':'2014-07-01 20:12:20']