全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
1075 0
2020-02-23
mport pandas as pd
import numpy as np
import geopandas as gp
import matplotlib.pyplot as plt
import shapely
import fiona
from mpl_toolkits.axes_grid1 import make_axes_locatable
import scipy


#china_geod0 = gp.GeoDataFrame.from_file('D:\data\china\gadm36_CHN_0.shp', encoding = 'gb18030')
china_geod1 = gp.GeoDataFrame.from_file('D:\data\china city344')
#china_geod2 = gp.GeoDataFrame.from_file('D:\data\china\gadm36_CHN_1.shp', encoding = 'gb18030')
#china_geod3 = gp.GeoDataFrame.from_file('D:\data\china\gadm36_CHN_1.shp', encoding = 'gb18030')
china_geod1.head(6)
print(china_geod1.head(6))
fig, ax = plt.subplots(1, 1)
#divider = make_axes_locatable(ax)
#cax = divider.append_axes("bottom", size="5%", pad=0.1)

#china_geod1.boundary.plot()

#china_geod0.plot()
china_geod1.plot(column='NAME_1', ax=ax, legend=True)
#china_geod1.plot(column='NAME_1',
           #cmap='OrRd',
           #ax=ax,
           #legend=True,
           #legend_kwds={'label': "Population by Country",
                       # 'orientation': "horizontal"}
                #)
#china_geod2.plot()
#china_geod3.plot()

plt.show()


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群