I've written some code to perform contouring on triangular grids. I
wrote the underlying C++ for a separate project, but as there has been
some interest on the mpl mailing lists for such functionality I've had
a go at wrapping it up as a python module so that it is available from
mpl. I've also added a few utility functions for plotting triangular
grids, doing pseudocolour plots, etc.
Attached is the source code with some documentation and examples.
There's an example of the output at
This example is similar to one of the mpl contourf examples, but on a
triangular grid of 1000 randomly spaced points, with the grid
So far it is only experimental code and hasn't been widely tested. I
have a list of improvements already, but thought it best to let people
see a working version before spending time polishing it. If it turned
out that a (much improved) version of it was considered good enough to
incorporate into mpl, I'd would happily help as I'd like to
I hope someone finds it useful!
mpl_tri.tar.gz (17.1 KB)