gpt4 book ai didi

linux - 时间转换在 gnuplot 中不起作用

转载 作者:太空宇宙 更新时间:2023-11-04 12:27:04 24 4
gpt4 key购买 nike

我有以下代码片段可以通过 gnuplot 输出图形。

set datafile separator ","

set title "Memory"
set xlabel "Values"
set ylabel "Date"
set ydata time
set timefmt "%H"
set format y "%d/%m/%Y"
set key left top
set grid

plot 'memory-memory-buffered_combined' using 0:2 titl "1" with lines,\
'memory-memory-cached_combined' using 0:2 title "2" with lines
cat
pause -1

但是,当我得到结果时,它是从 1970 年开始的。

我正在阅读的 csv 的前 5 行;

epoch,value
1478193413.596,72910
1478193473.412,134432
1478193413.158,65449
1478193411.929,60157

所以,实际上是 2016 年 11 月。

我的脚本的哪一部分应该不同?

最佳答案

set datafile separator ","

set title "irq"
set xlabel "Date"
set ylabel "Values"
set xdata time
set timefmt "%s"
set format x "%d/%m/%Y"
set key right top
set grid

set terminal jpeg size 3600,2100 enhanced font helvetica 20
set output "irq.jpg"


plot "/irq/irq-16_combined" using 1:2 title "irq-16" with lines

我对脚本进行了一些更改,但它仍然不一致。在 100 个具有相同模式和具有相同列名称和值的相似文件的脚本中,只有一个仍然输出时间从 1970 年开始的时间。你们中有人遇到过这样的问题吗?

关于linux - 时间转换在 gnuplot 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44313665/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com