I'm plotting a map with legends using the GeoPandas plotting function. When I plot, my legends appear in the upper right corner of the figure. Here is how it looks like:
我想将图例移到图表的下部。对于正常的 matplotlib 图,我通常会做这样的事情:
fig, ax = plt.subplots(1, figsize=(4.5,10))
lima_bank_num.plot(ax=ax, column='quant_cuts', cmap='Blues', alpha=1, legend=True)
ax.legend(loc='lower left')
然而,这种修改并未被考虑在内。
这可以使用以下方法完成legend_kwds
争论:
df.plot(column='values', legend=True, legend_kwds={'loc': 'lower right'});
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)