On Monday, June 6, 2011, Bruce Ford <br...@clearscienceinc.com> wrote:
> Does anyone have an example of nested grids.
> I need to (for instance), plot a global grid in filled contours, then plot 
> another, higher resolution grid over the US.The global grid could work 
> something like this, but I'm not sure where to start with the 2nd (nested) 
> grid to go atop.
>
>
> fig=plt.figure()m = 
> Basemap(resolution='c',projection='cyl',llcrnrlon=lon1,llcrnrlat=lat1,\       
>      urcrnrlon=lon2,urcrnrlat=lat2)# make a filled contour plot.
>
> x, y = m(lons, lats)CS = m.contour(x,y,hgt,15,linewidths=0.5,colors='k')CS = 
> m.contourf(x,y,hgt,15,cmap=plt.cm.jet)m.drawcoastlines()m.drawmapboundary()
> m.fillcontinents()
> # draw parallels and meridians.parallels = 
> np.arange(-90,90,10)#m.drawparallels(parallels,labels=[1,0,0,1])m.drawparallels(parallels,labels=[1,0,0,1])meridians
>  = np.arange(-180.,180.,10.)
>
> m.drawmeridians(meridians,labels=[1,0,0,1])plt.title('Plotted Grid')plt.show()
> Thanks!
> Bruce
> ---------------------------------------
> Bruce W. Ford
> Clear Science, Inc.
> br...@clearscienceinc.com
>
>
>
>
>

It should just work as you expect.  Do the global contour with the
coarser x/y data, and then do the US contour with finer x/y data.

Ben Root

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to