|
From: <js...@us...> - 2008-07-23 00:24:58
|
Revision: 5814
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5814&view=rev
Author: jswhit
Date: 2008-07-23 00:24:55 +0000 (Wed, 23 Jul 2008)
Log Message:
-----------
add griddata to pylab, add griddata docstrings to mlab and pylab module docstrings.
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/mlab.py
trunk/matplotlib/lib/matplotlib/pylab.py
Modified: trunk/matplotlib/lib/matplotlib/mlab.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/mlab.py 2008-07-22 19:47:04 UTC (rev 5813)
+++ trunk/matplotlib/lib/matplotlib/mlab.py 2008-07-23 00:24:55 UTC (rev 5814)
@@ -14,6 +14,8 @@
* find - Return the indices where some condition is true;
numpy.nonzero is similar but more general.
+ * griddata - interpolate irregularly distributed data to a
+ regular grid.
* prctile - find the percentiles of a sequence
@@ -90,12 +92,6 @@
import matplotlib.nxutils as nxutils
import matplotlib.cbook as cbook
-try:
- from mpl_toolkits.natgrid import _natgrid
- _use_natgrid = True
-except ImportError:
- import matplotlib.delaunay as delaunay
- _use_natgrid = False
# set is a new builtin function in 2.4; delete the following when
# support for 2.3 is dropped.
@@ -2720,6 +2716,12 @@
this function will use the mpl_toolkits.natgrid algorithm, otherwise it
will use the built-in matplotlib.delaunay package.
"""
+ try:
+ from mpl_toolkits.natgrid import _natgrid
+ _use_natgrid = True
+ except ImportError:
+ import matplotlib.delaunay as delaunay
+ _use_natgrid = False
if xi.ndim != yi.ndim:
raise TypeError("inputs xi and yi must have same number of dimensions (1 or 2)")
if xi.ndim != 1 and xi.ndim != 2:
Modified: trunk/matplotlib/lib/matplotlib/pylab.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/pylab.py 2008-07-22 19:47:04 UTC (rev 5813)
+++ trunk/matplotlib/lib/matplotlib/pylab.py 2008-07-23 00:24:55 UTC (rev 5814)
@@ -184,6 +184,7 @@
_Other
angle - the angle of a complex array
+ griddata - interpolate irregularly distributed data to a regular grid
load - load ASCII data into array
polyfit - fit x, y to an n-th order polynomial
polyval - evaluate an n-th order polynomial
@@ -219,7 +220,7 @@
from matplotlib.mlab import window_hanning, window_none,\
conv, detrend, detrend_mean, detrend_none, detrend_linear,\
- polyfit, polyval, entropy, normpdf,\
+ polyfit, polyval, entropy, normpdf, griddata,\
levypdf, find, trapz, prepca, fix, rem, norm, orth, rank,\
sqrtm, prctile, center_matrix, rk4, exp_safe, amap,\
sum_flat, mean_flat, rms_flat, l1norm, l2norm, norm, frange,\
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|