Can't make gnuplot plot timestamps

Viewed 24

I'm trying to make gnuplot plot battery charging gathered by a program against timestamps. Here's my gnuplot script and the data I'm trying to plot below it.

   set term x11
   set xlabel "Time"
   set xdata time
   set timefmt "%H:%M:%S"
   set ylabel "Battery Percent"
   plot "charge5.dat" using 2:5 with points

And a sample of the data plot I'm using:

13:53:16 95
13:53:16 95
13:53:16 95
13:55:16 95
13:55:16 95
13:55:16 95
13:57:16 95
13:57:16 95
13:59:16 96
13:59:16 96
13:59:16 96
14:01:16 96
14:01:16 96
14:01:16 96
14:03:16 96
14:03:16 96
14:05:16 96
14:05:16 96
14:05:16 96
14:07:16 96
14:07:50 100

Everything I've found says that this should work, and I'm stumped. I would appreciate some help, I'm sure my problem is a simple one. Thanks!

~

1 Answers

As shown, your data has time in the first column and charge in the second column. So the plot command would be

plot "charge5.dat" using 1:2 with points
Related