2015-10-07 78 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