|
From: Tim M. <tim...@gm...> - 2008-07-29 21:55:45
|
Hello Jeff, I just wanna give feedback on what got me going here: #### data preparation ### data is loaded from a CSV file ### lats = y # data[:,0] ## lon => x lons = x # data[:,1] ## values => z values = z #data[:,2] ### lat_uniq = list(set(lats.tolist())) nlats = len(lat_uniq) lon_uniq = list(set(lons.tolist())) nlons = len(lon_uniq) color_map = plt.cm.spectral print lats.shape, nlats, nlons yre = lats.reshape(nlats,nlons) xre = lons.reshape(nlats,nlons) zre = values.reshape(nlats,nlons) #### later in the defined map CT = m.contourf(xre, yre, zre, cmap=color_map) Of course, this can be simplified. But, really, in the end the solution was just simple and I hadn't thought of it... If you want I can try to create a short example for the distribution. Thanks for your help again, Timmie |