参考:https://blog.csdn.net/sinat_18665801/article/details/82291067#1__15

 

附世界地图:

[Python] Basemap

 [Python] Basemap

# 该2行包括必要的basemap和matplotlib库------世界地图
from mpl_toolkits.basemap import Basemap    
import matplotlib.pyplot as plt

# plt.figure(figsize=(10,8))
# map = Basemap()
map=Basemap(
    llcrnrlon=77,
    llcrnrlat=14,
    urcrnrlon=140,
    urcrnrlat=51,
    projection='lcc',
    lat_1=33,
    lat_2=45,
    lon_0=100
)#中国地图
map.drawcoastlines()#海岸线
map.drawcountries(linewidth=1.5)#国界线
map.readshapefile('gadm36_CHN_shp/gadm36_CHN_1', 'states', drawbounds=True)
plt.show()
plt.savefig('momo.png')

 

相关文章:

  • 2021-10-01
  • 2022-12-23
  • 2022-12-23
  • 2021-11-30
  • 2021-11-19
  • 2021-12-06
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-24
  • 2021-09-18
  • 2022-12-23
  • 2022-12-23
  • 2021-09-14
相关资源
相似解决方案