gnuplot等高线图详细信息

问题描述 投票:0回答:1

所以,我有一个3列(和40000行)的文件。第一列是x坐标,第二列是y坐标,第三列是“多少”,我想从这个文件生成等高线图。我四处搜索,并设法使用another post的解决方案。但最终的结果是分辨率非常低:[]

我尝试调整行“set dgrid3d 100,100,4”,但它并没有真正做多少。有帮助吗?最终结果应该是这样的:

编辑:我正在使用的代码

set contour
unset surface
set cntrparam levels incr 0.0,0.1,1.0

set view map
set xrange [0:30]
set yrange [0:30]

set dgrid3d 100,100,4

set table "contour.txt"
splot 'this.txt'
unset table

unset contour
set surface
set table "dgrid.txt"
splot 'this.txt'
unset table

reset
set pm3d map
unset key
set palette defined (0 '#352a87', 1 '#0363e1',2 '#1485d4', 3 '#06a7c6', 4 '#38b99e', 5 '#92bf73', 6 '#d9ba56', 7 '#fcce2e', 8 '#f9fb0e')
set autoscale fix
set grid

splot 'dgrid.txt' w pm3d, 'contour.txt' w l lc rgb "black"
plot gnuplot contour
1个回答
1
投票

您可以尝试更改代码中的isosamples参数:

set pm3d map
set multiplot layout 2,1

set isosamples 10
splot x*y

set isosamples 100
splot x*y

这导致:

enter image description here

当然,您总是受到基础数据采样的限制,但通过更改isosamples,您可以更接近您显示的原始图。

更多信息herehere。希望能帮助到你!

© www.soinside.com 2019 - 2024. All rights reserved.