Hi Jeff, Do you have in your bags a similar approch but using kriging? For the moment we use R via Rpy to make the computation, but if you know a more pythonic way to do so, I'll appreciate :-) Cordialy
Le mardi 10 juin 2008, Jeff Whitaker a écrit : > Jason Li wrote: > > Hi Jeff, > > > > Thanks for your help in the past. Just wondering if I can ask another > > question. This is with regard to plotting irregularly spaced geophysical > > data. > > > > I have been happy plotting gridded data away using matplotlib/basemap. > > Now I want to try irregularly spaced satellite data (swath data), using > > the confourf function. Basically to replace our IDL program to make > > plots like this: > > > > http://aurapar2u.ecs.nasa.gov/airscal2/Aqua_AIRS_Level1/AIRIBRAD.005/2008 > >/001/AIRS.2008.01.01.067.L1B.AIRS_Rad.v5.0.0.0.G08003111751.hdf.jpg > > > > > > > > I have not had much luck yet. In the following example, lat and lon are > > 2D arrays. > > > > map = Basemap(projection='cyl', lon_0=0, ax=ax, llcrnrlon=minLon, > > llcrnrlat=minLat, urcrnrlon=maxLon, urcrnrlat=maxLat) > > x, y = map(lon, lat) > > cs = map.contourf(x, y, obs, levels, cmap=myPrettyCmap) > > > > The error message: > > > > File > > "/usr/local//lib/python2.5/site-packages/matplotlib/toolkits/basemap/base > >map.py", line 2442, in contourf > > xl = xx.compress(condition).tolist() > > AttributeError: compress > > > > > > Do you have a good example as how to do this kind of thing? > > > > thanks > > Jason: contourf expects gridded data. I think you need to use one of > the approaches outlined in the cookbook entry > > http://www.scipy.org/Cookbook/Matplotlib/Gridding_irregularly_spaced_data > > to grid your data, then plot it. > > If you'd like to send me a sample of the data, I can show you what I mean. > > -Jeff -- Lionel Roubeyrie - [EMAIL PROTECTED] Chargé d'études et de maintenance LIMAIR - la Surveillance de l'Air en Limousin http://www.limair.asso.fr ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users