2015-10-14 122 views
0

我的情節是這樣的: enter image description here上層3dPlot繪製網格(gnuplot的5)

爲了提高小區多一點,我想也有觀點認爲在這樣的層(抱歉的電力網不好的油漆工作): enter image description here

我檢查了文檔中的網格章節。 有沒有一種方法可能爲每個zic設置一個網格,然後只在顯示數據的彩色部分使其可見

thx幫助到目前爲止,它不起作用,我的數據看起來像此:

2015-03-22 06:00 0.00 0.58 0.00 0.58 9 8.2 8.2 8.2 64 1.8 1.8 NNW 0.11 3.6 NNW 7.2 7.8 6.8 4.7 1016.8 0.00 0.0 0 0.00 0 0.0 0.00 0.0 0.007 0.000 21.4 28 2.2 19.4 0.05 15 1 65.2 1 1.8823831042606498 659.801927242555 

2015-03-22 06:01 0.00 0.58 0.00 0.58 9 8.2 8.2 8.2 64 1.8 0.4 NNW 0.03 1.8 NNW 8.2 7.8 7.8 5.6 1016.9 0.00 0.0 0 0.00 0 0.0 0.00 0.0 0.007 0.000 21.4 28 2.2 19.4 0.00 16 1 69.6 1 1.926984097278376 644.530487695342 

2015-03-22 06:02 0.00 0.58 0.00 0.58 9 8.2 8.2 8.2 64 1.8 2.7 NNW 0.16 3.1 NNW 6.5 7.8 6.1 3.9 1016.9 0.00 0.0 0 0.00 0 0.0 0.00 0.0 0.007 0.000 21.4 28 2.2 19.4 0.00 11 1 47.8 1 1.8741943892130313 662.6847285150141 

有muliple文件,所有在該圖含有 有一天,我使用3:43:1 所以一個數據:數據:日期(%Y%米%d)

回答

1

編輯:我注意到這不適用於我發佈後的每種數據集。它將取決於你的數據結構,但我把它留在這裏,因爲它可能會幫助你進一步。我建議你提供一些示例數據,這樣可以更容易地提供解決方案。

我認爲最簡單的方法是重複使用相同的繪圖語句生成彩色曲面的繪圖,但使用線條而不是pm3d。 (假設你使用了pm3d)。您可以通過更改isosamples來更改曲面網格的密度。

set isosamples 20,20 

sp "data.txt" w pm3d notitle,\ 
    "data.txt" w l lt 1 lc rgb "grey50" notitle 

一個完整工作示例

set terminal postscript enhanced color 
set output "plot.eps" 

# Change these two values to rotate 
set view 50,50 

# Density of grid for functions 
# Higher numbers here will change density if the grid in the surface 
set isosamples 20,20 

# Axis labels 
set xlabel "x" 
set ylabel "y" 
set zlabel "z" 

# Axis ranges 
set xrange[0:5] 
set yrange[0:5] 
set zrange[0:5] 
set cbrange[0:5] 

# Defining functions as I have no data 
f(x,y)= (x > 0 && x < 2 && y > 1 && y < 3) ? 3 : 1/0 
g(x,y)= (x > 3 && x < 4 && y > 1 && y < 3) ? 4 : 1/0 
h(x,y)= (x > 2 && x < 5 && y > 0 && y < 2) ? 1 : 1/0 
i(x,y)= (x > 4 && x < 5 && y > 3 && y < 5) ? 2 : 1/0 

# Grid on xy plane 
# Change xtics for denser grid 
set xtics 1.0 
set ytics 1.0 

set grid ytics lc rgb "#bbbbbb" lw 1 lt 0 
set grid xtics lc rgb "#bbbbbb" lw 1 lt 0 

# No colorbox 
unset colorbox 

# Plotting 
sp f(x,y) w pm3d notitle,\ 
    f(x,y) w l lt 1 lc rgb "grey50" notitle,\ 
    g(x,y) w pm3d notitle,\ 
    g(x,y) w l lt 1 lc rgb "grey50" notitle,\ 
    h(x,y) w pm3d notitle,\ 
    h(x,y) w l lt 1 lc rgb "grey50" notitle,\ 
    i(x,y) w pm3d notitle,\ 
    i(x,y) w l lt 1 lc rgb "grey50" notitle 

產生以下結果

result