I want to plot a geodataframe from Buenos Aires, the proportion of poor houses. There's the code:
import pandas as pd
import geopandas as gpd
import matplotlib.pyplot as plt
caba=gpd.read_file('https://bitsandbricks.github.io/data/CABA_rc.geojson')
The problem: the colorbar it's too big. I tried to pass some "legend_kwds" but there is an error.
fig, ax = plt.subplots(figsize=(10,10))
ax.set_aspect('equal')
caba.plot(ax=ax, column='HOGARES_NBI', cmap='viridis',edgecolor='grey',linewidth=0.01,
facecolor='r', legend=True, legend_kwds={})
plt.title('Proporción de hogares \n con al menos una necesidad básica insatisfecha',fontsize=15)
ax.set_axis_off()
Here's the image of the really BIG colorbar
I tried to pass {'prop':{'size':2}} but it don't work.
The error: __init__() got an unexpected keyword argument 'prop'
Thanks!