时间转换在gnuplot中不起作用

时间:2017-06-01 17:24:27

标签: linux bash gnuplot

我有以下代码片段通过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月。

我的剧本的哪一部分应该有所不同?

1 个答案:

答案 0 :(得分:0)

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年开始的输出。您是否有任何经历过这样的问题?

相关问题