当前位置: 动力学知识库 > 问答 > 编程问答 >

gnuplot - Treat axis as date/time (epoch)

问题描述:

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?

网友答案:

Is this what you want?

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

i followed this from the gnuplot howto :

03/21/95 10:00 6.02e23

This file can be plotted by

   set xdata time
   set timefmt "%m/%d/%y"
   set xrange ["03/21/95":"03/22/95"]
   set format x "%m/%d"
   set timefmt "%m/%d/%y %H:%M"
   plot "data" using 1:3
分享给朋友:
您可能感兴趣的文章:
随机阅读: