来自双号的gnuplot时间戳格式(13dig.epoch)

时间:2015-04-24 07:12:56

标签: gnuplot javaplot

我有一个包含字符串的文件

1.429520882432E12 3432.0 
1.429520882914E12 1573.0
...

第一个col是纪元时间戳(13位),我怎么能从中获取时间?我找不到'双'数字的格式

我从javaplot程序导出它并且plot 'file' using ($1*1000000000000):2不合适,但如果我能用javaplot来做,那就太棒了!

1 个答案:

答案 0 :(得分:3)

为什么要将值乘以100000000 ......?这些值已经以浮点数(毫秒)给出。你必须将它们除以1000.这样做,我得到这个输出,完全适合你的432和914毫秒:

enter image description here

以下是代码:

set xdata time
set timefmt "%s"                   # Format in file
set format x "%Y-%m-%d %H:%M:%.3S" # Format of axis labels
set xtics 0.05                     # One label every 50ms
set xtics rotate by 30 right       # Labels are looong...
set grid

plot "timedData.csv" u (($1/1000)):2 with linespoints