On Tue, Jul 22, 2008 at 6:30 AM, Jeff Whitaker <[EMAIL PROTECTED]> wrote:

> Chris: I've now added a griddata function to matplotlib.mlab that uses
> Robert Kern's scikit.delaunay code (which is now included in matplotlib
> as matplotlib.delaunay).  The more bulletproof natgrid code, with the
> dubious license, is included as a toolkit (mpl_toolkits.natgrid), which
> griddata is configured to automatically use if installed.

Jeff, thanks for the extra effort to do it this way -- I know it was a
pain.  But at least now we get

  * commercial users can rely on our license as iron-clad

  * griddata will work transparently out of the box for regular users

  * we provide a path to the more bullet proof code for those who need it

I have a few comments I'll include below.

* Let's move the try/except natgrid/griddata import to the griddata
function itself so users not using griddata will not have to pay for
the import, since this will likely be 99% of the mpl users

* Expose griddata to the pylab interface and add it to the pylab  and
mlab module doc strings

* We should provide some help for those who may want to try the
natgrid code, eg if you plan on releasing it on the sf site as a
toolkit, which I think is best, then we can link to the download page
in the docstring.  If not, perhaps just provide an svn checkout line
for folks.

* Let's report which package is being used at the verbose helpful
level, preferably with some version info if it is available.  When
questions come in on the mailing list later, we will want to know
which package griddata is using.  You might set a flag on the griddata
function along the lines of

def griddata(blah)
    if not griddata._reported:
        if _use_natgrid:
            verbose.report('using natgrid version blah')
        else:
            verbose.report('using delaunay version blah')
        natgrid._reported = True
griddata._reported = False

* After the next release, let's remember to update the cookbook entry
- http://www.scipy.org/Cookbook/Matplotlib/Gridding_irregularly_spaced_data

Anyway, this is a great piece of additional functionality that we've
literally been waiting years for, so thanks for taking the extra time
to do it so thoroughly.

And enterprising developers everywhere, it would still be extremely
useful to follow Robert's suggestions to improve the delaunay code
along the lines discussed in this thread earlier.  Not for the faint
of heart, but users for generations to come will thank you.

JDH

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to