I try to create a geopanda plot where I need to set specific values for xlim and ylim. It works but the legend is huge now. I would prefer for it to be as large as the actual plotted map, but can't seem to figure out how to control this behaviour.
Minimal working example
import numpy as np
import matplotlib; print(matplotlib.__version__)
import matplotlib.pyplot as plt
import geopandas; print(geopandas.__version__)
world = geopandas.read_file(geopandas.datasets.get_path('naturalearth_lowres'))
fig = plt.figure()
ax = fig.add_axes([0, 0, 1, 1])
ax.axis('off')
world.plot(ax=ax, column='2015', legend=True,
legend_kwds={'label': "Population", 'orientation': "horizontal"})
minx, miny, maxx, maxy = -12, 30, 30,80
ax.set_xlim(minx, maxx)
ax.set_ylim(miny, maxy)
ax.margins(0)
ax.tick_params(left=False, labelleft=False, bottom=False, labelbottom=False)
plt.savefig('sample.png', bbox_inches="tight", pad_inches=0)

