无法使用legend_kwds参数调整geopandas图例的位置

时间:2019-01-16 04:09:41

标签: python geopandas

我正在使用geopandas 0.3.0制作地图,但返回错误AttributeError:未知属性legend_kwds

lgnd_kwds = {'title': 'Districts',
               'loc': 'upper left', 'bbox_to_anchor': (1, 1.03), 'ncol': 1}

districts.plot(column = 'district', cmap = 'tab20', legend = True, legend_kwds = lgnd_kwds)
plt.xlabel('Latitude')
plt.ylabel('Longitude')
plt.title('Nashville School Districts')
plt.show()

是否存在一种解决方法,以不与地图重叠的方式显示图例?谢谢

0 个答案:

没有答案