Re: [Matplotlib-users] griddata fails

2013-01-10 Thread Shahar Shani-Kadmiel
Yes, you are absolutely correct. I did not realize that I did not actually evaluate the function over a grid, makes sense that interpolation fails. I thought that since I created the two axis vectors the function evaluation occurs over the entire domain, meshgrid is what I was missing. thanks,

Re: [Matplotlib-users] griddata fails

2013-01-09 Thread Ian Thomas
On 9 January 2013 09:32, Shahar Shani-Kadmiel wrote: > Hi, > > I'm trying to contour some data that I have and the griddata line fails. I > tried running it on some synthetically generated data and I get the same > IndexError. Any Ideas? > > Here is the example with the synthetic data: > > x = y =

[Matplotlib-users] griddata fails

2013-01-09 Thread Shahar Shani-Kadmiel
Hi, I'm trying to contour some data that I have and the griddata line fails. I tried running it on some synthetically generated data and I get the same IndexError. Any Ideas? Here is the example with the synthetic data: x = y = arange(-10,10,0.01) z = x**2+y**3 xi = yi = linspace(-10.1, 10.1

Re: [Matplotlib-users] griddata is not working after update to Python 2.7

2012-05-30 Thread Umut Yildiz
Dear Benjamin, Thanks for the reply. Apparently my Python 2.6 version was completely removed and I only have Python 2.7. My matplotlib and numpy are the latest versions. In matplotlib homepage, I found that meshgrid should do the same job, but I cannot make script to run it from a file. Is there a

Re: [Matplotlib-users] griddata is not working after update to Python 2.7

2012-05-24 Thread Benjamin Root
On Thursday, May 24, 2012, Umut Yildiz wrote: > Dear All, > > I used to use griddata in order to make my contourmaps. However, after I > updated > my Python from 2.6 to 2.7 griddata is not working anymore. > > I tried some workarounds but no success. > > The countourmap that I produced before is h

[Matplotlib-users] griddata is not working after update to Python 2.7

2012-05-24 Thread Umut Yildiz
Dear All, I used to use griddata in order to make my contourmaps. However, after I updated my Python from 2.6 to 2.7 griddata is not working anymore. I tried some workarounds but no success. The countourmap that I produced before is here. http://dl.dropbox.com/u/17983476/matplotlib/contour_dT_wo

Re: [Matplotlib-users] Griddata failling; how to try natgrid version?

2011-12-21 Thread Brad Malone
Jeff, Thanks. That indeed did work (after downloading python-dev package). I just didn't know that 'install' was the argument that I was supposed to pass to it =) After installing I tried griddata again. My input data was originally a list. The new griddata didn't like this and so I simply used a

Re: [Matplotlib-users] Griddata failling; how to try natgrid version?

2011-12-21 Thread Jeff Whitaker
On 12/21/11 12:31 AM, Brad Malone wrote: Hi, I'm still working on my interpolating from an irregularly space grid and then running pcolormesh on the resulting output. With some of the newer data I've been plotting I've noticed that my plots are complete garbage. I realized that this was actuall

[Matplotlib-users] Griddata failling; how to try natgrid version?

2011-12-20 Thread Brad Malone
Hi, I'm still working on my interpolating from an irregularly space grid and then running pcolormesh on the resulting output. With some of the newer data I've been plotting I've noticed that my plots are complete garbage. I realized that this was actually because of the output from griddata rather

[Matplotlib-users] griddata

2011-09-15 Thread Nils Wagner
Hi all, what are the differences between the griddata implementations in matplotlib and scipy, i.e. from scipy.interpolate import griddata and from matplotlib.mlab import griddata Is the Shepard algorithm available in matplotlib/scipy ? Nils Reference: Robert J. Renka Algorithm 790: CSHEP2

[Matplotlib-users] griddata usage

2011-08-18 Thread bhargav vaidya
Hello all Can any one explain me how can I use griddata in matplotlib for 2-d interpolation of polar to cartesian co-ordinates. I have two 1D arrays r and theta of 128 and 64 cells respectively I have a 2D array temperature T(r,theta) with (128, 64) cells. I would like to have Tnew(200,200) cel

Re: [Matplotlib-users] griddata question

2011-02-21 Thread Pauli Virtanen
Fri, 18 Feb 2011 20:24:31 +0100, Nils Wagner wrote: > what is the reason for the white areas in the corners of the > interpolation domain? > Any idea ? Griddata does not do any extrapolation, and the corners are outside the convex hull of the point set. > import numpy as np > from scipy.interpol

Re: [Matplotlib-users] griddata question

2011-02-18 Thread Ryan May
On Fri, Feb 18, 2011 at 1:24 PM, Nils Wagner wrote: > Hi all, > > what is the reason for the white areas in the corners of the interpolation > domain ? > Any idea ? The white areas are not bounded by your data points (they are located outside the convex hull of the data points), so the interpolat

Re: [Matplotlib-users] griddata

2011-02-14 Thread Ryan May
On Mon, Feb 14, 2011 at 8:40 AM, Nils Wagner wrote: > Hi all, > > Is it possible to apply griddata to polar coordinates or > do I need cartesian coordinates ? > > http://matplotlib.sourceforge.net/api/mlab_api.html#matplotlib.mlab.griddata You can keep the data in polar coordinates, you just need

[Matplotlib-users] griddata

2011-02-14 Thread Nils Wagner
Hi all, Is it possible to apply griddata to polar coordinates or do I need cartesian coordinates ? http://matplotlib.sourceforge.net/api/mlab_api.html#matplotlib.mlab.griddata Nils -- The ultimate all-in-one performanc

Re: [Matplotlib-users] griddata and masked arrays

2010-04-08 Thread Friedrich Romstedt
2010/4/3 ms : > I am trying to use griddata to plot some (irregularly) spaced data as a > contour plot, but sometimes ALL the grid it outputs is masked: so no plot. > > In the docs I read: > "A masked array is returned if any grid points are outside convex hull > defined by input data (no extrapola

[Matplotlib-users] griddata and masked arrays

2010-04-03 Thread ms
Hi, I am trying to use griddata to plot some (irregularly) spaced data as a contour plot, but sometimes ALL the grid it outputs is masked: so no plot. In the docs I read: "A masked array is returned if any grid points are outside convex hull defined by input data (no extrapolation is done)." but

Re: [Matplotlib-users] griddata array size limit?

2009-08-19 Thread othererik
tfoutz99, I occasionally run into this issue as well. At quick glance I suspect it may be related to the limitation listed at: http://www.scipy.org/scipy/scikits/ticket/61 ...but I could be way off base as I'm not sure if the code is derived from the same place. -Erik tfoutz99 wrote: > > Hi

[Matplotlib-users] griddata array size limit?

2009-08-05 Thread tfoutz99
Hi! I am basing my code off the example posted at: http://www.scipy.org/Cookbook/Matplotlib/Gridding_irregularly_spaced_data Gridding irregularly spaced data When I use my own data, I am getting a KeyError (Posted below) However, if I only use a subset of my data (for which the total length=263

Re: [Matplotlib-users] griddata returns nan

2009-07-23 Thread plankton
plankton wrote: > > Greetings all, > > I rotate a vector field and than I tried to interpolate it to a new grid > using griddata. > > CODE: > > x_grid_unique = unique(x_grid) > y_grid_unique = unique(y_grid) > x_meshgrid, y_meshgrid = meshgrid(x_grid_unique, y_gri

Re: [Matplotlib-users] griddata returns nan

2009-07-22 Thread Jeff Whitaker
plankton wrote: > Greetings all, > > I rotate a vector field and than I tried to interpolate it to a new grid > using griddata. > > CODE: > > x_grid_unique = unique(x_grid) > y_grid_unique = unique(y_grid) > x_meshgrid, y_meshgrid = meshgrid(x_grid_unique, y_grid_unique)

[Matplotlib-users] griddata returns nan

2009-07-19 Thread plankton
Greetings all, I rotate a vector field and than I tried to interpolate it to a new grid using griddata. CODE: x_grid_unique = unique(x_grid) y_grid_unique = unique(y_grid) x_meshgrid, y_meshgrid = meshgrid(x_grid_unique, y_grid_unique) x_rot_meshgrid = reshap

Re: [Matplotlib-users] Griddata

2009-06-08 Thread green63
I ve a problem with the use of griddata. I have a grid of x,y with value z. the grid have 4500 points I would like to have a rigular grid of 1500 points. I try the function zi = griddata(x,y,z,xi,yi) but I have an error "too many indices". I don't understant why!!! x,y,z,xi and yi are numpy array

Re: [Matplotlib-users] Griddata

2009-04-16 Thread Josh Lawrence
Jeff, Thanks for the speedy reply. Should a warning be raised then that my data (though in 2D form) is not 2D and therefore is invalid input? Cheers, Josh Lawrence Ph.D. Student Clemson University On Apr 16, 2009, at 2:53 PM, Jeff Whitaker wrote: > Josh Lawrence wrote: >> Greetings all, >> >

Re: [Matplotlib-users] Griddata

2009-04-16 Thread Jeff Whitaker
Josh Lawrence wrote: > Greetings all, > > In using the function griddata in mlab.py, I think I have found a bug. > The following line in mlab.py errors for me. > I supply it an xi and yi that have shape (N,1). I have surface data, > but I only care about the variation in one direction. In mlab,

[Matplotlib-users] Griddata

2009-04-16 Thread Josh Lawrence
Greetings all, In using the function griddata in mlab.py, I think I have found a bug. The following line in mlab.py errors for me. I supply it an xi and yi that have shape (N,1). I have surface data, but I only care about the variation in one direction. In mlab, when it gets to this line (29

Re: [Matplotlib-users] griddata performance

2009-02-20 Thread Eric Firing
Jeff Whitaker wrote: > Armin Moser wrote: >> Jeff Whitaker wrote: >> >>> Armin Moser wrote: >>> Hi, I would like to interpolate an array of shape (801,676) to regularily spaced datapoints using griddata. This interpolation is quick if the (x,y) supporting points are

Re: [Matplotlib-users] griddata performance

2009-02-20 Thread Armin Moser
Eric Firing wrote: > Jeff Whitaker wrote: >> Armin Moser wrote: >>> Jeff Whitaker wrote: >>> Armin Moser wrote: > Hi, > > I would like to interpolate an array of shape (801,676) to regularily > spaced datapoints using griddata. This interpolation is quick if the

Re: [Matplotlib-users] griddata performance

2009-02-20 Thread Armin Moser
Jeff Whitaker wrote: > Armin Moser wrote: >> Jeff Whitaker wrote: >> >>> Armin Moser wrote: >>> Hi, I would like to interpolate an array of shape (801,676) to regularily spaced datapoints using griddata. This interpolation is quick if the (x,y) supporting points are c

Re: [Matplotlib-users] griddata performance

2009-02-20 Thread Eric Firing
Jeff Whitaker wrote: > Armin Moser wrote: >> Jeff Whitaker wrote: >> >>> Armin Moser wrote: >>> Hi, I would like to interpolate an array of shape (801,676) to regularily spaced datapoints using griddata. This interpolation is quick if the (x,y) supporting points are

Re: [Matplotlib-users] griddata performance

2009-02-20 Thread Jeff Whitaker
Armin Moser wrote: > Jeff Whitaker wrote: > >> Armin Moser wrote: >> >>> Hi, >>> >>> I would like to interpolate an array of shape (801,676) to regularily >>> spaced datapoints using griddata. This interpolation is quick if the >>> (x,y) supporting points are computed as X,Y = meshgrid(x,y)

Re: [Matplotlib-users] griddata performance

2009-02-20 Thread Armin Moser
Jeff Whitaker wrote: > Armin Moser wrote: >> Hi, >> >> I would like to interpolate an array of shape (801,676) to regularily >> spaced datapoints using griddata. This interpolation is quick if the >> (x,y) supporting points are computed as X,Y = meshgrid(x,y). If this >> condition is not fullfilled

Re: [Matplotlib-users] griddata performance

2009-02-20 Thread Ryan May
On Fri, Feb 20, 2009 at 8:11 AM, Armin Moser wrote: > Hi, > > I would like to interpolate an array of shape (801,676) to regularily > spaced datapoints using griddata. This interpolation is quick if the > (x,y) supporting points are computed as X,Y = meshgrid(x,y). If this > condition is not fullf

Re: [Matplotlib-users] griddata performance

2009-02-20 Thread Jeff Whitaker
Armin Moser wrote: > Hi, > > I would like to interpolate an array of shape (801,676) to regularily > spaced datapoints using griddata. This interpolation is quick if the > (x,y) supporting points are computed as X,Y = meshgrid(x,y). If this > condition is not fullfilled the delaunay triangulation i

[Matplotlib-users] griddata performance

2009-02-20 Thread Armin Moser
Hi, I would like to interpolate an array of shape (801,676) to regularily spaced datapoints using griddata. This interpolation is quick if the (x,y) supporting points are computed as X,Y = meshgrid(x,y). If this condition is not fullfilled the delaunay triangulation is extremely slow, i.e. not use