2015-10-07 45 views
0

我的数据是这样的:gnuplot的:ContourPlot(在格式化网格数据)

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 
........ 
........ 

我要绘制的第43行中相对于第3和第25行:-)因此,这些都是行要挑选出来的文件:

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

我想设置660.7143449269239相对于0.23156并绘制二维轮廓图。

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

做我的数据需要像:

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

回答

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 
+0

好感谢,所以我结束了对圆的z值等高线图是否正确?那是什么dgrid3d呢? –

+0

是的。由于您的数据看起来很分散(似乎是实验或其他事件的度量),因此需要使用'dgrid3d'来计算轮廓。 'dgrid3d'将z值插入(通过平均值或样条线)到xy平面中的统一网格中。然后绘制插值点而不是原始数据。您可以控制'dgrid3d'插入/平均数据的方式(在gnuplot中键入'help dgrid3d')。如果你的数据已经是均匀分布的,就没有必要使用'dgrid3d'。 – vagoberto