-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
如果要在一页多图里面使用cnmaps,只有最后一张图用了cnmaps #28
Comments
可以提供一下代码片段吗?如果有数据就更好了。 |
像下面这样,只有ax2中能绘制,能否传递ax? def plot_map(ax): cart_proj = ccrs.PlateCarree() ax1 = fig.add_axes([0.13, 0.15, 0.5, 0.5], projection=cart_proj) ax1 = plot_map(ax1) |
from cnmaps import get_adm_maps, draw_maps cart_proj = ccrs.PlateCarree() ax1 = fig.add_axes([0.13, 0.15, 0.5, 0.5], projection=cart_proj) ax2 = fig.add_axes([0.13+0.65, 0.15, 0.5, 0.5], projection=cart_proj) |
调整一下绘制顺序: from cnmaps import get_adm_maps, draw_maps
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
def plot_map(ax):
draw_maps(get_adm_maps(province='河南省'), linewidth=0.3, color='k')
return ax
cart_proj = ccrs.PlateCarree()
fig = plt.figure(figsize=(5, 5), dpi=300)
ax1 = fig.add_axes([0.13, 0.15, 0.5, 0.5], projection=cart_proj)
ax1 = plot_map(ax1)
ax2 = fig.add_axes([0.13+0.65, 0.15, 0.5, 0.5], projection=cart_proj)
ax2 = plot_map(ax2) |
No description provided.
The text was updated successfully, but these errors were encountered: