微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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

如何解决gnuplot和非结构化数据是否可能

到目前为止,我已经能够使用pm3d生成2D结构化数据的2D等高线图。但是,我有一些数据文件,其中包含一些我试图在结构化数据旁边绘制的非结构化网格的流visualisation。到目前为止,我已经找到一些链接,指向一些有关如何生成轮廓图Link的脚本,但是似乎唯一的方法是通过dgrid3d,它仅生成轮廓线而不是轮廓线。像这张图片

enter image description here

一样的表面流。

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

非常感谢您的帮助!

解决方法

dgrid3d仅产生行是不正确的。这是数据的预处理步骤,随后可以使用所需的任何样式进行绘制。

这里是使用具有高斯分布的一组预先生成的随机点的示例。显示的代码应与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

enter image description here

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。