2015-04-24 261 views
1

我有一個字符串文件gnuplot的時間戳格式

1.429520882432E12 3432.0 
1.429520882914E12 1573.0 
... 

第一關口是劃時代的時間戳(13位),我怎麼可能有時間的呢?我找不到'雙'數字的格式

我從javaplot程序導出它並且plot 'file' using ($1*1000000000000):2不適合,但是如果我可以用javaplot做它,那太棒了!

回答

2

爲什麼你乘以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