Advertisement
Guest User

Untitled

a guest
Sep 24th, 2012
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | None | 0 0
  1.         ngrid = 500
  2.         x = np.array(lats)
  3.         y = np.array(lons)
  4.         z = np.array(data)
  5.        
  6.         xi = np.linspace(lat_min, lat_max, ngrid)
  7.         yi = np.linspace(lon_min, lon_max, ngrid)
  8.         xi, yi = np.meshgrid(xi, yi)
  9.         zi = griddata(x, y, z, xi, yi)
  10.        
  11.         # draw the map
  12.         plt.xlim(lat_min, lat_max)
  13.         plt.ylim(lon_min, lon_max)
  14.         plt.contour(xi, yi, zi, 20, linewidths=1)
  15.         plt.scatter(x, y, c=z, s=20)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement