【问题标题】:gnuplot contour plot detailgnuplot 等高线图详细信息
【发布时间】:2019-03-10 04:14:38
【问题描述】:

所以,我有一个包含 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"

【问题讨论】:

  • 你有多少个数据点?也许你可以提供数据。您使用的确切代码是什么?
  • 用我正在使用的代码更新了问题。数据数量不是问题,有40000个点

标签: plot gnuplot contour


【解决方案1】:

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

set pm3d map
set multiplot layout 2,1

set isosamples 10
splot x*y

set isosamples 100
splot x*y

这会导致:

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

更多信息herehere。希望对您有所帮助!

【讨论】:

  • 我用我正在使用的代码更新了我的问题。我应该将命令“set isosamples 100”放在哪里,我已经尝试过了,它并没有改变任何东西。点数是 40000。这不是问题,因为我可以用另一个软件制作等高线图,并且图形很好(使用相同的文件),就分辨率而言。
  • 如果你只是做set pm3d map; set isosamples 100; splot "this.txt"然后改变isosamples会发生什么?
猜你喜欢
  • 1970-01-01
  • 2019-11-28
  • 2010-12-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-10-04
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多