本文整理汇总了Python中matplotlib.toolkits.basemap.Basemap.pcolormesh方法的典型用法代码示例。如果您正苦于以下问题:Python Basemap.pcolormesh方法的具体用法?Python Basemap.pcolormesh怎么用?Python Basemap.pcolormesh使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类matplotlib.toolkits.basemap.Basemap
的用法示例。
在下文中一共展示了Basemap.pcolormesh方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: arange
# 需要导入模块: from matplotlib.toolkits.basemap import Basemap [as 别名]
# 或者: from matplotlib.toolkits.basemap.Basemap import pcolormesh [as 别名]
meridians = arange(0.,360.,20.)
m.drawmeridians(meridians)
# draw boundary around map region.
m.drawmapboundary()
title('Orthographic')
print 'plotting Orthographic example, close plot window to proceed ...'
show()
# setup of sinusoidal ('sinu' = sinusioidal projection)
m = Basemap(projection='sinu',
resolution='c',area_thresh=10000.,lon_0=0.5*(lonsin[0]+lonsin[-1]))
fig=figure()
ax = fig.add_axes([0.1,0.1,0.7,0.7])
# plot image over map with pcolormesh.
x,y = m(*meshgrid(lonsin,latsin))
p = m.pcolormesh(x,y,topodatin,shading='flat')
l,b,w,h = ax.get_position()
cax = axes([l+w+0.05, b, 0.05, h]) # setup colorbar axes.
colorbar(cax=cax) # draw colorbar
axes(ax) # make the original axes current again
# draw coastlines and political boundaries.
m.drawcoastlines()
# draw parallels and meridians
parallels = arange(-60.,90,30.)
m.drawparallels(parallels,labels=[1,0,0,0])
meridians = arange(0.,360.,30.)
m.drawmeridians(meridians)
# draw boundary around map region.
m.drawmapboundary()
title('Sinusoidal')
print 'plotting Sinusoidal example, close plot window to proceed ...'