Gnuplot:ContourPlot(格式化为网格数据)

时间:2015-10-07 10:17:49

标签: gnuplot contour

我的数据如下:

2015-08-01 07:00    0.23    0.52    0.00    0.52    9   14.6    14.6 14.6   67  8.5 0.0 --- 0.00    0.0 --- 14.6    14.1    14.1    16.3    1016.2  0.00      0.0   156 0.22    156 0.0 0.00    0.0 0.003   0.000   23.9    39  9.1 23.4    0.05    23  1   100.0   1   1.8797836153192153  660.7143449269239

2015-08-01 07:01    0.25    0.53    0.00    0.53    0   14.6    14.6    14.6    67  8.5 0.0 --- 0.00    0.0 --- 14.6    14.1    14.1    16.3    1016.2  0.00    0.0 153 0.22    153 0.0 0.00    0.0 0.003   0.000   23.9    39  9.1 23.4    0.00    23  1   100.0   1   1.8894284951616422  657.3416264126714   105 73  121 163

2015-08-01 07:02    0.25    0.52    0.00    0.52    0   14.7    14.7    14.6    67  8.6 0.0 --- 0.00    0.0 --- 14.7    14.2    14.2    16.1    1016.2  0.00    0.0 139 0.20    139 0.0 0.00    0.0 0.003   0.000   23.9    39  9.1 23.4    0.00    24  1   100.0   1   1.8976360559992214  654.4985251906015

2015-08-01 07:03    0.26    0.53    0.00    0.53    0   14.7    14.7    14.7      67    8.6 0.0 --- 0.00    0.0 --- 14.7    14.2    14.2    16.1    1016.3  0.00    0.0 139 0.20    144 0.0 0.00    0.0 0.003   0.000   23.9    39  9.1 23.4    0.00    23  1   100.0   1   1.9047561611790007  652.0519661851259

2015-08-01 07:04    0.25    0.53    0.00    0.53    0   14.7    14.7    14.7    67  8.7 0.0 --- 0.00    0.0 --- 14.7    14.2    14.2    16.2    1016.3  0.00    0.0 141 0.20    141 0.0 0.00    0.0 0.003   0.000   23.9    39  9.1 23.4    0.00    24  1   100.0   1   1.903537153899393   652.4695341279602

2015-08-01 07:05    0.25    0.52    0.00    0.52    0   14.8    14.8    14.7    67  8.7 0.0 --- 0.00    0.0 --- 14.8    14.3    14.3    16.3    1016.3  0.00    0.0 148 0.21    148 0.0 0.00    0.0 0.002   0.000   23.9    39  9.1 23.4    0.00    23  1   100.0   1   1.897596925383499   654.5120216976508
 ........
 ........

我想绘制与第3行和第25行相关的第43行:-)所以那些是想要从文件中挑选的行:

0.23 156 660.7143449269239
0.25 153 660.7143449269239
0.25 139 654.4985251906015
0.26 139 652.0519661851259

我想将660.71434492692390.23156相关联,并绘制2d等高线图。

我阅读了文档,但我不知道这些行是否足以构建Contour Plot,或者我是否需要更改它们?如果是这样,我可以在gnuplot中执行此操作,还是必须重写文件tiself?< / p>

我的数据需要如下所示:

0.23 156 660.7143449269239(0.23,156)
0.25 153 660.7143449269239(0.25,253)

1 个答案:

答案 0 :(得分:1)

这是要走的路(通过代码评论):

set dgrid3d        # enable 3D data read from a scattered data set in file
set contour base   # enable contour drawing 
set view map       # if you want to see the graph from above (2D plot)
unset surface      # do not plot the surface, only the contour

# finally, plot your data selecting columns 3, 25, and 43
splot 'datafile' using 3:25:43