T J wrote: > Hi, > > I'm trying to grid irregularly spaced data, such that the convex hull > of the data is not rectangular. Specifically, all my data lies in an > equilateral triangle inside the unit circle. I found: > > http://www.scipy.org/Cookbook/Matplotlib/Gridding_irregularly_spaced_data > > and tried the suggested technique. For my grid, I made a square of > the min and max of my data. However, it had problems: > > ... > File > "/home/guest/.local/lib/python2.6/site-packages/matplotlib/delaunay/triangulate.py", > line 125, in _compute_convex_hull > hull.append(edges.pop(hull[-1])) > KeyError: 0 > > > Should I expect matplotlib.mlab.griddata to work with a dataset like > this? I know that I can use hexbin, but it'd be really nice to see > contours explicitly. >
We have the natgrid toolkit for just this reason - it's slower than the default, and has a more restrictive license, but it often succeeds when the default algorithm fails. This is discussed at the end of that wiki page. Let us know if the natgrid toolkit also fails. -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : jeffrey.s.whita...@noaa.gov 325 Broadway Office : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg ------------------------------------------------------------------------------ SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users