2013-03-19 87 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