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 = reshape(x_rot,  [ len(x_meshgrid[:, 0]),
len(x_meshgrid[0, :])] )
        y_rot_meshgrid = reshape(y_rot,  [ len(x_meshgrid[:, 0]),
len(x_meshgrid[0, :])] )
        u_rot_meshgrid = reshape(u_rot,  [ len(x_meshgrid[:, 0]),
len(x_meshgrid[0, :])] )
        v_rot_meshgrid = reshape(v_rot,  [ len(x_meshgrid[:, 0]),
len(x_meshgrid[0, :])] )
        u_interpolate = griddata(x_rot,  y_rot, u_rot,  x_rot_meshgrid, 
y_rot_meshgrid)
        v_interpolate = griddata(x_rot,  y_rot, v_rot,  x_rot_meshgrid, 
y_rot_meshgrid)



I unfortunately griddata returns some nan (It seems that there are multiple
occurrences of the same [X,Y] pair in the data). In matlab you can use
griddata with additional options  e.g. ru =
griddata(nx,ny,nu,rx,ry,'linear', {'QJ'}) to fix this, but this seems to be
not possible using the griddata function in matplotlib. Is there any other
way to avoid a return of nan?

For any help many thanks in advance

Andreas



-- 
View this message in context: 
http://www.nabble.com/griddata-returns-nan-tp24537481p24537481.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to