- 积分
- 5752
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2018-7-19
- 最后登录
- 1970-1-1
![未绑定新浪微博用户 新浪微博达人勋](source/plugin/sina_login/img/gray.png)
|
发表于 2022-2-13 16:55:12
|
显示全部楼层
本帖最后由 Finnick 于 2022-2-13 16:58 编辑
王老师 我用一楼一模一样的脚本跑出来的盆地图横纵坐标标注是有问题的,想问一下王老师出现这个问题是什么原因啊?
#read data
fn = r'D:\test/dixing-china.nc'
f = addfile(fn)
elev = f['z']['26:34','102:108']/1000.0
lchina = shaperead('D:/Temp/map/bou2_4p.shp')
#Plot
figure(figsize=[1400,850],newfig=False)
ax = axes3d(tickfontsize=20,position=[0.1, 0.13, 0.75, 0.85],bbox=False)
levs = arange(0,6.1,0.1)
cols = makecolors(len(levs) + 1, cmap='temp_diff_18lev',reverse=False)
ls = ax.plot_surface(elev, levs, colors=cols, edge=False)
colorbar(ls,ticks=arange(0,6.1,1),orientation='horizontal',label='Altitude(km)',labelloc='right',fontsize=24,shrink=0.8,aspect=40,yshift=35)
ylabel('Latitude (degrees)',fontsize=20)
xlabel('Longitude (degrees)',fontsize=20)
zlabel('Altitude (km)',fontsize=20)
zlim(0, 6)
xlim(102, 108)
ylim(26,34)
picpath = 'E:/topographicmap.png'
plt.savefig(picpath,dpi=1200)
plt.clf()
|
|