2013-10-15 42 views
1

我有一个2列,时间和分数的文件。我想添加第三栏,显示比分同时下降多少。例如gnuplot上的点与3列的分散

10, 200, 180 
11, 210, 200 

Gnuplot应该显示一条连接这两点的线。 此刻,我的gnuplot脚本仅显示2列的点分散。

#!/usr/bin/gnuplot 
set grid 
set title 'Reputação dos peers quando excluíram arquivos' 
set xlabel 'Tempo Discreto da exclusão' 
set ylabel 'Reputação' 

set style line 1 lc rgb '#0060ad' lt 1 lw 1 pi -1 ps 1.0 
set style line 2 lc rgb '#dd181f' lt 1 lw 1 pi -1 ps 1.0 
set pointintervalbox 0 
plot 'ReputationOnExclusion.txt' using 1:2 with points ls 1 title 'Exclusão' 
pause -1 
+0

我不完全明白你想达到什么。 “10,200”点与“10,180”连接?或者应该如何解释第三栏? – Christoph

+0

是的,就像一个标准偏差,但只限于该点的下面 –

回答

1

要连接y - 值在第三列中的值第二列,您可以使用vectors绘图风格:

set style line 1 lc rgb '#00f0ad' lt 1 
set style arrow 1 linestyle 1 nohead 
plot 'ReputationOnExclusion.txt' using 1:2:(0):($3-$2) with vectors arrowstyle 1 

using声明的值是x y xdelta ydeltaxdelta0,ydelta是第三列和第二列之间的差异(是相对值)。