1
我希望显示在从沿时间线的多个源一定时间戳给出的数据。例如,与follwing到输入文件与柱1为时间戳和列2的数据:对齐时间戳值到时间轴
O1.dat:
100 5
300 10
O2.dat:
200 7
400 3
随着该所有值的平均值以一定间隔进行采样:
Avg.dat:
250 6.5
500 6.25
我想绘制的所有值在表状的方式,所以它看起来是这样的,与价值观相一致,以顶部的时间:
我的真实数据达到的时间戳高达10000,所以动态会很好。
到目前为止,我只简单的绘制框或线图,所以我不知道如何去这一个。
谢谢你的时间。
编辑:
这是什么样子至今一起接受的答案做了调整:
仍然有一些重叠的,但那是因为该数据是简单地彼此太靠近了。用于此脚本:
#set term pdf
#set term pdf size 8, 5
#set output 'out.pdf'
set term png
set term png size 1200, 700
set output 'out.png'
set termoption font ",20"
set label 'Time (ms)' at graph 0, graph 1 offset -0.75, char 1 right
unset border
unset key
unset xtics
set ytics scale 0
set x2tics() scale 0
set yrange [0:5.5]
set x2range[0:10000]
set lmargin 9
set arrow from graph -0.15, graph 1 to graph 1.1, graph 1 nohead
set arrow from graph -0.01, graph 1.2 to graph -0.01, graph -0.2 nohead
set arrow from graph -0.15, first 0.3 to graph 1.1, first 0.3 nohead
set style data labels
plot for [i=0:9] 'desc'.i.'.txt' using 1:(5-0.5*i):(sprintf('%d', $2)):ytic('Object '.i) axes x2y1, \
'Avg.dat' using 1:(0):(sprintf('%d', $2)):ytic('Avg') axes x2y1
这点上,非常感谢你。我用当前的结果编辑了我的问题。还有一些调整要做,但看起来不错。 – BananaBuster