以下Python代码可以很好地展现西欧:
import matplotlib.pyplot as plt
import cartopy
import cartopy.io.shapereader as shpreader
import cartopy.crs as ccrs
plt.figure(figsize=(10, 10))
ax = plt.axes(projection=ccrs.EuroPP())
ax.add_feature(cartopy.feature.BORDERS, linestyle='-', alpha=1)
ax.coastlines(resolution='10m')
ax.add_feature(cartopy.feature.OCEAN,facecolor=(0.5,0.5,0.5))
ax.gridlines()
但是,将地图扩展到包括土耳其和其他高加索国家在内的东方的方式是什么?我是否需要在()
的EuroPP()
中包含一些参数?我是否需要将projection=ccrs.EuroPP()
更改为其他内容?找不到任何示例...
import cartopy
import cartopy.crs as ccrs
import matplotlib.pyplot as plt
plt.figure(figsize=(9, 9))
ax = plt.axes(projection=cartopy.crs.TransverseMercator(32))
ax.add_feature(cartopy.feature.BORDERS, linestyle='-', alpha=1)
ax.coastlines(resolution='110m')
ax.add_feature(cartopy.feature.OCEAN, facecolor=(0.5,0.5,0.5))
ax.gridlines()
ax.set_extent ((-7.5, 50, 34, 69), cartopy.crs.PlateCarree())
plt.show()
您将得到这样的情节: