bendoesdata / make-a-map-geopandas

Tutorial on how to make a choropleth map using Geopandas and Matplotlib in Python.
91 stars 53 forks source link

Figure size with 0 axes #2

Open Keys42 opened 4 years ago

Keys42 commented 4 years ago

Update: Fixed it. User error on my end. I was typing in different Jupyter cells, which is what caused the axes to disappear. Thanks for the great tutorial!

Great tutorial and followed everything, but keep getting following error at merged.plot() stage: "<matplotlib.axes._subplots.AxesSubplot at 0x23722390e88> <Figure size 432x288 with 0 Axes>"

I can reproduce the map if I remove ax=ax from the following line: merged.plot(column=variable, cmap='Blues', linewidth=0.8, ax=ax, edgecolor='0.8')

As here: merged.plot(column=variable, cmap='Blues', linewidth=0.8, ax=ax, edgecolor='0.8')

but the figure size shrinks too small.

I think there may be an issues somewhere here in this line fig, ax = plt.subplots(1, figsize=(10,6))