2013-10-15 44 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是第三列和第二列之間的差異(是相對值)。