Gnuplot 和非结构化数据是否可能

Gnuplot and unstructured data is it possible

到目前为止,我已经能够使用 pm3d 为二维结构化数据生成二维等高线图。但是,我得到了一些数据文件,其中包含我试图在结构化数据旁边绘制的非结构化网格的一些流 visualisation。到目前为止,我已经找到一些链接指向一些关于如何生成等高线图的脚本 Link, but it seems that the only way to do it is through dgrid3d, which only generates contours lines rather than the surface flow like this picture

我只是想知道是否有更好的方法来使用 gnuplot tool 生成类似的情节。

非常感谢您的帮助!

dgrid3d 只生成线是不正确的。这是数据的预处理步骤,随后可以使用您想要的任何样式对其进行绘制。

这是一个使用 pre-generated 高斯分布随机点集的示例。显示的代码应该适用于 gnuplot 5.2 或更新版本。在当前的 gnuplot 版本中可以使用稍微简单一些的 plot 命令,但显示的命令仍然有效。

set view map
unset key
set cbtics format ""  # no tic labels on the colorbar
set palette cubehelix negative

#
# Generate a grid from point density of previously-generated Gaussian
#
set dgrid3d 50,50 gauss kdensity

#
# Make all contour lines black
#
set contour base
set cntrparam levels incremental 0,200
set cntrparam firstlinetype 101
set for [L=101:110] linetype L linecolor "black" dashtype solid
set style textbox opaque noborder

set pm3d explicit at b

#
# Order of drawing is important.
# First the surface, then the lines, then the labels
#
splot $random using 1:2:(1) with pm3d, \
      '' using 1:2:(1) with lines nosurface, \
      '' using 1:2:(1):("") with labels boxed