GNUPLOT:如何使用columhead注释曲线

时间:2013-11-27 23:30:17

标签: gnuplot

我正在使用

plot for [i=0:1] "DiffT" every:::i::i w l lw 2 title columnhead

绘制存储在单个数据文件中的2条曲线,并用空行分隔它们。在每条曲线数据的开头,我包括我想要作为曲线标题的数据。但是这只适用于第一条曲线。

数据文件是:

0.1                 # title for the first curve
3 1.68791e-03 
4 8.99050e-05
5 4.94916e-06 

0.2                # title for the second curve
6 2.44474e-07 
7 1.19909e-08 
8 1.39325e-09 

1 个答案:

答案 0 :(得分:0)

使用两个空行作为分隔符,index选择数据集,然后columnhead起作用:

DiffT是:

0.1                 # title for the first curve
3 1.68791e-03 
4 8.99050e-05
5 4.94916e-06 


0.2                # title for the second curve
6 2.44474e-07 
7 1.19909e-08 
8 1.39325e-09 

绘图
plot for [i=0:1] "DiffT" index i w l lw 2 title columnhead(1)