mgilson
mgilson

Reputation: 309841

Gnuplot and unstructured data

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
...

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)

Upvotes: 0

Views: 1145

Answers (1)

mgilson
mgilson

Reputation: 309841

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!

Upvotes: 1

Related Questions