簡體   English   中英

gnuplot讀取unix時間戳

[英]gnuplot read unix timestamp

我有一個包含以下格式數據的文件:

1351649601.045 421 2945
1351649601.684 1036 28591
1351649603.310 128 1620
1351649603.413 93 0
1351649603.375 132 1762
1351649603.318 218 1761
1351649603.434 412 176
1351649603.441 520 5780
1351649603.480 565 11070
1351649603.556 644 11535


gnuplot> set term png
Terminal type set to 'png'
gnuplot> set output "output.png"
gnuplot> plot "data.txt" using 1:2 with lines

但是,gnuplot無法正確讀取日期。 你有什么想法?

解決了:

set term png xffffff
set output "output.png"
set size 17,17
set title "HTTP payload size and response time"
set style data fsteps
set xlabel "Date"
set timefmt "%s"
set format x "%m/%d/%Y %H:%M:%S"
set xdata time
set ylabel "Payload/Response time"
set grid
set key left
plot 'response' usi 1:2 with linespoints

對不起,似乎無法刪除。 打算建議:

set xdata time
set timefmt "%s"
set format x "%m/%d/%Y %H:%M:%S"
plot "file.txt" using 1:2 with linespoints

但它會截斷分數並從線上掉落點。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM