linux - gnuplot 读取 unix 时间戳

标签 linux gnuplot

我有一个包含这种格式数据的文件:

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

但它会截断分数并从线上删除点。

关于linux - gnuplot 读取 unix 时间戳,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13202108/

相关文章:

gnuplot - 绘制多天的相同时间段

命令 "set data s l"上的 Gnuplot 错误

GNUPLOT:统计数据在循环中给出错误的结果

sublimetext2 - 从Sublime2 OSX构建Gnuplot

linux - sudo写入模式错误

c++ - 杀死和使用 waitpid 进行收获的能力之间的预期持续时间

linux - Python-Requests 模块使用 IPv6 提供 502

plot - 在gnuplot中绘制两个轴

linux - 从 bash 脚本设置 crontab

linux - Linux中的U区等效数据结构是什么?