【发布时间】:2017-06-07 12:18:56
【问题描述】:
我想使用 Cartopy 仅绘制一个区域(在我的例子中是北美和南美)。
我目前正在使用以下代码:
import cartopy
import cartopy.crs as ccrs
import matplotlib.pyplot as plt
lon, lat, freq = .., ..., ... # initialize longitude and latitude and line width
ax = plt.axes(projection=ccrs.PlateCarree())
ax.stock_img()
ax.add_feature(cartopy.feature.LAND)
ax.add_feature(cartopy.feature.OCEAN)
ax.add_feature(cartopy.feature.COASTLINE)
ax.add_feature(cartopy.feature.BORDERS, linestyle='-', alpha=.5)
for la, lo, fq in zip(lat, lon, freq):
plt.plot(lo, la, color='red', linewidth=fq, marker='o', transform=ccrs.PlateCarree())
然后它产生:
我想要什么(放大版):
有没有办法做到这一点?
【问题讨论】: