问题描述
我有一个x,y点的网格(就gnuplot而言)是非结构化的.我想使用gnuplot的pm3d在该网格上绘制一个变量.目前,我正在构造一个delaunay镶嵌,并将每个三角形作为单独的数据集写入数据文件.例如,数据文件如下所示:
I have a grid of x,y points that are (as far as gnuplot is concerned) unstructured. I would like to plot a variable on that grid using gnuplot's pm3d. Currently, I'm constructing a delaunay tesselation and writing each triangle into the datafile as a separate dataset. for example, the datafile looks something like this:
#triangle 1
x1 y1 c1
x2 y2 c2
x3 y3 c3
x3 y3 <c1+c2+c3>/3.
#triangle 2
x1 y1 c1
x2 y2 c2
x3 y3 c3
x3 y3 <c1+c2+c3>/3.
#triangle 3
...
这似乎行得通,但是我想知道是否有更好的方法来实现这一目标? (如果有关系,我正在使用Python + Delny接口构造delaunay镶嵌)
This seems to work Ok, but I was wondering if there a better way to accomplish this? (if it matters, I'm using Python+Delny interface to construct the delaunay tesselation)
推荐答案
显然,上述解决方案与我将要找到的解决方案一样好.除了dgrid3d
以外,如果您有更好的方法在gnuplot中绘制非结构化数据,我希望听到它!
Apparently the above solution is as good as I'm going to find. If you have a better way to plot unstructured data in gnuplot, other than dgrid3d
, I'd love to hear it!
这篇关于Gnuplot和非结构化数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!