Relocating legend from GeoPandas plot
This could be done using the legend_kwds
argument:
df.plot(column='values', legend=True, legend_kwds={'loc': 'lower right'});
You can access the legend defined on the ax
instance with ax.get_legend()
. You can then update the location of the legend using the method set_bbox_to_anchor
. This doesn't provide the same ease of use as the loc
keyword when creating a legend from scratch, but does give control over placement. So, for your example, something like:
leg = ax.get_legend()
leg.set_bbox_to_anchor((0., 0., 0.2, 0.2))
A bit of documentation of set_bbox_to_anchor, though I don't find it extraordinarily helpful.