Skip to content

Commit eb37f36

Browse files
author
Jeff Whitaker
committed
implement some of JDH's suggestions for griddata.
svn path=/trunk/matplotlib/; revision=5815
1 parent e1774c8 commit eb37f36

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

lib/matplotlib/delaunay/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88
from matplotlib._delaunay import delaunay
99
from triangulate import *
1010
from interpolate import *
11+
__version__ = "0.1"

lib/matplotlib/mlab.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989

9090
import numpy as np
9191

92+
from matplotlib import verbose
9293

9394
import matplotlib.nxutils as nxutils
9495
import matplotlib.cbook as cbook
@@ -2715,13 +2716,23 @@ def griddata(x,y,z,xi,yi):
27152716
that is not redistributable under a BSD-compatible license. When installed,
27162717
this function will use the mpl_toolkits.natgrid algorithm, otherwise it
27172718
will use the built-in matplotlib.delaunay package.
2719+
2720+
The natgrid matplotlib toolkit can be checked out through SVN with the
2721+
following command:
2722+
2723+
svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/toolkits/natgrid natgrid
27182724
"""
27192725
try:
2720-
from mpl_toolkits.natgrid import _natgrid
2726+
from mpl_toolkits.natgrid import _natgrid, __version__
27212727
_use_natgrid = True
27222728
except ImportError:
27232729
import matplotlib.delaunay as delaunay
2730+
from matplotlib.delaunay import __version__
27242731
_use_natgrid = False
2732+
if _use_natgrid:
2733+
verbose.report('using natgrid version %s' % __version__)
2734+
else:
2735+
verbose.report('using delaunay version %s' % __version__)
27252736
if xi.ndim != yi.ndim:
27262737
raise TypeError("inputs xi and yi must have same number of dimensions (1 or 2)")
27272738
if xi.ndim != 1 and xi.ndim != 2:

0 commit comments

Comments
 (0)