2013-03-19 84 views
1

我想從我的.dat文件的最後一行設置我的gnuplot圖表的標題,但我不知道該怎麼做。Gnuplot動態設置標題

我.dat文件讀起來像:

Column1 Column2 
1 0.5 
2 1.5 
3 2.5 
4 3.5 
5 4.5 
6 5.5 
Average is ?????? 

會有人知道的命令來設置使用的最後一行的文字標題?

回答

2

gnuplot允許shell風格的反向擴展。結合這與UNIX應用程序tail應該工作得很好:

set title "`tail -1 myfile.dat`" 
plot 'myfile.dat' u 1:2 
+0

工作。謝謝 :) – 2013-03-21 19:59:09