I am trying to plot a map using geopandas and seaborn. My problem is that the color legend's height extends beyond the height of my figure. How can I control its orientation, height, width etc to avoid this problem?
Here is my code:
import numpy as np
fig,axes = plt.subplots(nrows=2,ncols=2, figsize=(6.2,6),dpi=600)
cols = cresult.columns[1:5]
cols = np.array(cols)
cols=cols.reshape(2,2)
title = np.array(['(a)','(b)','(c)','(d)']).reshape(2,2)
sns.set(context='paper', style='ticks',)
for i in range(2):
for j in range(2):
btnshp.plot(ax=axes[i,j], color='w', edgecolor='black')
Gcresult.plot(ax=axes[i,j], label=cols[i,j], column=cols[i,j],
cmap='viridis', markersize=15,legend=True)
axes[i,j].set_xlabel(title[i,j])
plt.tight_layout()
This is what I have so far, you can see that the color legend is too big for the map: