I'm trying to set figure labels for my conditioned hexagonal binning plot, but when I run this code I get the Attribute Error: 'Figure'object has no attribute 'supxlabel'
. Any help with this problem would be appreciated.
zip_codes = [98188, 98105, 98108, 98126]
def hexbin_zips(ax, zipcode):
kc_tax_zip = kc_tax_stripped.loc[kc_tax_stripped['ZipCode'] == zipcode]
out = ax.hexbin(kc_tax_zip['SqFtTotLiving'], kc_tax_zip['TaxAssessedValue'], gridsize=30)
return out
fig, ((ax1, ax2), (ax3, ax4)) = plt.subplots(2, 2, figsize=(12, 10), sharex='col', sharey='row')
axes = [ax1, ax2, ax3, ax4]
for n in range(4):
hexbin_zips(axes[n], zip_codes[n])
axes[n].set_title(str(zip_codes[n]))
fig.supxlabel('Total Living Space in Square Feet', fontsize=16.)
fig.supylabel('Tax-Assessed Value', fontsize=16.)