Does anyone have extensions or hints on how to create high quality vector contour plots on unstructured triangle meshes, with values at nodes? I can convert to structured with griddata, but I much prefer to get a direct contour from the original triangles. Thanks!

Ian Curington wrote:

Does anyone have extensions or hints on how to create high quality vector contour plots on unstructured triangle meshes, with values at nodes? I can convert to structured with griddata, but I much prefer to get a direct contour from the original triangles. Thanks!

Ian: Matplotlib's contour cannot do this (although I believe the underlying c code does have this capability). I think it would be a useful addition. For right now, however, your workaround is the best solution.

PyNGL (http://www.pyngl.ucar.edu/Graphics/contour_grids.shtml) can contour triangular meshes, if you'd like to give that a try.

-Jeff

## ···

--

Jeffrey S. Whitaker Phone : (303)497-6313

NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449

325 Broadway Boulder, CO, USA 80305-3328

Jeff Whitaker wrote:

Ian Curington wrote:

Does anyone have extensions or hints on how to create high quality vector contour plots on unstructured triangle meshes, with values at nodes? I can convert to structured with griddata, but I much prefer to get a direct contour from the original triangles. Thanks!

Ian: Matplotlib's contour cannot do this (although I believe the underlying c code does have this capability). I think it would be a

Although contouring routines often do subdivide the rectilinear grid into triangles, and use those triangles to calculate the contours, the cntr.c routine in mpl does not. It does everything using only the original rectilinear grid.

Eric

## ···

useful addition. For right now, however, your workaround is the best solution.

PyNGL (http://www.pyngl.ucar.edu/Graphics/contour_grids.shtml) can contour triangular meshes, if you'd like to give that a try.

-Jeff