Rich Fought wrote:
> Hi,
>
> I've successfully plotted gridded data on a basemap "cyl" projection 
> using pcolor:
>
>  mp = Basemap(projection="cyl", resolution="l", llcrnrlon=0.0, 
> urcrnrlon=30.0, llcrnrlat=-5.0, urcrnrlat=5.0)
>  pc = mp.pcolor(X, Y, zvalsm, cmap=cm.jet)
>
> However, if I simply I change the projection type to merc, adding 
> appropriate lat_ts, I get the projection but the pcolor fails to plot on 
> it:
>
>  mp = Basemap(projection="merc", lat_ts=0.0, resolution="l", 
> llcrnrlon=0.0, urcrnrlon=30.0, llcrnrlat=-5.0, urcrnrlat=5.0)'
>  pc = mp.pcolor(X, Y, zvalsm, cmap=cm.jet)
>
> Any ideas? I am using matplotlib 0.91.2 and basemap 0.9.9 on CentOS 4.0 
> with Python 2.3.
>
> Thanks,
> Rich
>
>   
Rich:  What are X and Y set to?  They should be the map projection coorindates 
of the grid.  If they are latitudes and longitudes, this will work for 'cyl' 
but not 'merc'.  For 'merc', you must convert the lats and lons to x and y using

x, y = mp(lon, lat)

-Jeff

-- 
Jeffrey S. Whitaker         Phone  : (303)497-6313
Meteorologist               FAX    : (303)497-6449
NOAA/OAR/PSD  R/PSD1        Email  : [EMAIL PROTECTED]
325 Broadway                Office : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web    : http://tinyurl.com/5telg


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to