[Numpy-discussion] Convert data into rectangular grid

jah jah.mailinglist at gmail.com
Mon Sep 28 19:19:24 EDT 2009


Hi,

Suppose I have a set of x,y,c data (something useful for
matplotlib.pyplot.plot() ).  Generally, this data is not rectangular at
all.  Does there exist a numpy function (or set of functions) which will
take this data and construct the smallest two-dimensional arrays X,Y,C (
suitable for matplotlib.pyplot.contour() ).

Essentially, I want to pass in the data and a grid step size in the x- and
y-directions.  The function would average the c-values for all points which
land in any particular square.  Optionally, I'd like to be able to specify a
value to use when there are no points in x,y which are in the square.

Hope this makes sense.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20090928/9deead45/attachment.html>


More information about the NumPy-Discussion mailing list