- 积分
- 3308
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2017-3-9
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2020-11-18 18:59:46
|
显示全部楼层
fig=plt.figure(figsize=(8,6))
ax=fig.add_subplot(111,projection=ccrs.PlateCarree())
ax.set_extent(region,crs=ccrs.PlateCarree())
ax.xaxis.set_major_formatter(LongitudeFormatter())
ax.yaxis.set_major_formatter(LatitudeFormatter())
ax.set_xticks(np.arange(region[0],region[1]+0.5,2),crs=ccrs.PlateCarree())
ax.set_yticks(np.arange(region[2],region[3]+0.5,2),crs=ccrs.PlateCarree())
i=0
for name in ['shanghai','anhui','jiangxi','jiangsu','fujian','zhejiang','wenzhou']:
shp='/home/users/wangbo/scrp/SHP/shp/'+name+'.shp'
ax.add_geometries(Reader(shp).geometries(),ccrs.PlateCarree(),facecolor='none',edgecolor='k',linewidth=1.)
i+=1
levelz=np.arange(np.min(pr),np.max(pr)+8,20)
plot=ax.scatter(lons,lats, c=pr, cmap=cmaps.precip3_16lev,marker='.',transform=ccrs.PlateCarree(),s=pr)
plt.colorbar(plot,ax=ax,extend='both',ticks=levelz,shrink=0.8)
plt.show() |
|