如何解决什么可能阻止左轴在以下 cartopy 图中正确显示?
顶部轴显示得很好,数字后面有一个度数和一个字母。不幸的是,我不能对左轴说同样的话。它只给我一个数字,而不是一个学位后跟一个 N,因为我认为它应该给出以下代码。
for i in range(nt):
print ('plotting map',i+1,'of',nt)
fig=plt.figure(i+1)
plotsl = np.copy(all_sl[i,:,:])
[r,c] = np.where(plotsl>np.max(levels))
plotsl[r,c] = np.max(levels)
[r,c] = np.where(plotsl<np.min(levels))
plotsl[r,c] = np.min(levels)
ax = fig.add_subplot(1,1,projection=ccrs.PlateCarree())
ax=plt.axes(projection=ccrs.PlateCarree(central_longitude=120))
ax.set_extent([152,-145,30,80])
im=ax.contourf(Longitude,Latitude,plotsl,transform=ccrs.PlateCarree(),\
cmap='nipy_spectral',levels=levels)
gl=ax.gridlines(linestyle='--')
gl.xlabels_top = True
gl.ylabels_left = True
gl.xformatter=LONGITUDE_FORMATTER
gl.xlocator = mticker.FixedLocator([-175])
gl.ylocator = mticker.FixedLocator([60])
gl.xlines = True
gl.ylines = True
gl.xlabel_style={'color': 'blue'}
gl.ylabel_style={'color': 'blue'}
ax.coastlines()
plt.colorbar(im)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。