所以我正在运行这段代码来绘制地图,无论我尝试什么,我都无法摆脱 0 到 1 的丑陋盒子/框架。当我摆脱图形框架时,它指的是内部的我想保留的纬度/经度。
df = days_dict[t]
proj = ccrs.PlateCarree()
ax = plt.axes(projection=proj)
bounds = [-125.0011, -66.9326, 49.5904, 24.9493]
ax.set_extent(bounds, crs=ccrs.PlateCarree())
im = ax.scatter(df['long'], df['lat'], c=df['mean_no2'], s=8, cmap=cm.bwr, vmin=0, vmax=40)
cartography(ax)
axins = inset_axes(ax, width="90%", height="10%", loc='lower center', borderpad=-3)
cbar = plt.colorbar(im, label='NO2 concentration (ppb)', orientation='horizontal', cax=axins, fraction=0.046, norm=norm, anchor=(0.5, -1))
cbar.set_ticks(np.arange(0, 40, 10))
plt.show()
fig = plt.gcf()
fig.bbox_inches='tight'
fig.frameon = False
axins.frameon = False
out_name = out_folder + '\\frame%s.png' % t
fig.savefig(out_name)
fig.clear()
我想要内部框架,而不是外部框架。我怎样才能摆脱这个?