Treat axis as date/time (epoch)

Jeffrey Aylesworth picture Jeffrey Aylesworth · Nov 20, 2009 · Viewed 23.5k times · Source

I'm generating a graph with gnuplot of activity over the last twenty four hours, but the time axis looks really bad because it's trying to fit the long number for every five minutes in the last day.

Is there any way for gnuplot to treat the x-axis as an epoch time, and mark every hour or so?

Answer

Alok Singhal picture Alok Singhal · Dec 9, 2009

Is this what you want?

set xdata time
set timefmt "%s"
# set xtics 3600
set format x "%H:%M:%S" # or whatever
plot ...