2017-05-26 65 views
0

我試圖用不同的顏色繪製向量。顏色值作爲第三列存儲在數據文件中。從Gnuplot中的數據文件讀取顏色值

例如,讓我們說的數據文件爲 「a.txt中」 包含

0.603358 2.022173 1

1.08929 2.039982 2

1.588976 2.040512 3

典型的情節是

使用1:1繪製'a.txt':($ 2- $ 1):(0)使用矢量頭大小屏幕的notitle 0.008,90 lc 2

問題是,「lc」如何取第三列值?

回答

0

使用linecolor variable,它從最後提到的列中獲取顏色。

plot 'a.txt' using 1:1:($2-$1):(0):3 notitle with vectors heads size screen 0.008,90 lc variable 

enter image description here