在using语句中调整时间值

时间:2015-11-26 12:26:48

标签: time gnuplot

我尝试比较两个显示内存消耗与时间增加的数据文件。数据源于我在不同时间执行的两个测试,我试图通过在x和y轴上移动第二个图来使差异(或等价)变得明显。

这是我的test.plt脚本(plot行包含此问题):

reset

set title "Memory consumtion of process"
set style data fsteps
set xlabel 'Zeit (HH:MM:\nSS.ddd)'
set timefmt '"%H:%M:%S"'
set xdata time
set xrange ['"10:00:00"' : '"13:00:00"']
set yrange [12000 : 20000]
set ylabel "Memory\nin KBytes"
set format x "%H:%M:\n%.3S"
set grid
set key left

plot 'mem-2015-11-26-1229.dat' using 1:2 with lines,
  'mem-2015-11-26.dat' using 1:($2-1500) with lines

y没有问题,因为这是一个正常的标量值。但是我很难用x轴做同样的事情,这就是我试图改变x的方式(一切都没有成功):

plot 'mem-2015-11-26-1229.dat' using 1:2 with lines,
  'mem-2015-11-26.dat' using ($1-3600.0):($2-1500) with lines

甚至不使用别名($1)似乎在时间轴上工作:

plot 'mem-2015-11-26-1229.dat' using 1:2 with lines,
  'mem-2015-11-26.dat' using ($1):($2-1500) with lines

两者都发出以下警告(第二个文件没有输出):

  

“test.plt”,第15行:警告:跳过没有有效点的数据文件

我做错了什么?甚至可以计算时间值吗?如果有,怎么样?

0 个答案:

没有答案