2015-10-14 39 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