I have the following code for 27 subplots in a 9x3 single plot. I want to add specific individual titles to each subplot, eg. "District 7 - Brooklyn." However, this code repeats both the data and the title for all 27 subplots, presumably because of the last line of code. I have consulted this previous SO question and tried all three of those methods, but each one erases the data in the subplot when the title is added or is broadcast incorrectly.
fig, axes = plt.subplots(9,3,figsize=(30,80))
for ax in axes.flatten():
ax1 = district_1_change.drop(['TOTAL'], axis=1).plot.bar(legend=True, ax=ax)
ax1.set_title("District 1: Eastern Long Island", fontsize=18)
ax2 = district_2_change.drop(['TOTAL'], axis=1).plot.bar(legend=True, ax=ax)
ax2.set_title("District 2: Southern Long Island", fontsize=18)
ax3 = district_3_change.drop(['TOTAL'], axis=1).plot.bar(legend=True, ax=ax)
ax3.set_title("District 3: Northern Long Island", fontsize=18)
ax4 = district_4_change.drop(['TOTAL'], axis=1).plot.bar(legend=True, ax=ax)
ax4.set_title("District 4: Central, Southern Nassau County", fontsize=18)
ax5 = district_5_change.drop(['TOTAL'], axis=1).plot.bar(legend=True, ax=ax)
ax5.set_title("District 5: Queens", fontsize=18)
ax6 = district_6_change.drop(['TOTAL'], axis=1).plot.bar(legend=True, ax=ax)
ax6.set_title("District 6: Queens", fontsize=18)
ax7 = district_7_change.drop(['TOTAL'], axis=1).plot.bar(legend=True, ax=ax)
ax7.set_title("District 7: Queens", fontsize=18)
ax8 = district_8_change.drop(['TOTAL'], axis=1).plot.bar(legend=True, ax=ax)
ax8.set_title("District 8: Brooklyn, Queens", fontsize=18)
ax9 = district_9_change.drop(['TOTAL'], axis=1).plot.bar(legend=True, ax=ax)
ax9.set_title("District 9: Brooklyn", fontsize=18)
ax10 = district_10_change.drop(['TOTAL'], axis=1).plot.bar(legend=True, ax=ax)
ax10.set_title("District 10: Upper West Side, FiDi, Greenwich Village, Borough Park (BK)", fontsize=18)
ax11 = district_11_change.drop(['TOTAL'], axis=1).plot.bar(legend=True, ax=ax)
ax11.set_title("District 11: Staten Island, Southern Brooklyn", fontsize=18)
ax12 = district_12_change.drop(['TOTAL'], axis=1).plot.bar(legend=True, ax=ax)
ax12.set_title("District 12: Eastern Manhattan, Greenpoint (BK), Western Queens", fontsize=18)
ax13 = district_13_change.drop(['TOTAL'], axis=1).plot.bar(legend=True, ax=ax)
ax13.set_title("District 13: Upper Manhattan, Bronx", fontsize=18)
ax14 = district_14_change.drop(['TOTAL'], axis=1).plot.bar(legend=True, ax=ax)
ax14.set_title("District 14: Eastern Bronx, North Central Queens", fontsize=18)
ax15 = district_15_change.drop(['TOTAL'], axis=1).plot.bar(legend=True, ax=ax)
ax15.set_title("District 15: Southern, Western Bronx", fontsize=18)
ax16 = district_16_change.drop(['TOTAL'], axis=1).plot.bar(legend=True, ax=ax)
ax16.set_title("District 16: North Bronx, Southern Westchester ", fontsize=18)
ax17 = district_17_change.drop(['TOTAL'], axis=1).plot.bar(legend=True, ax=ax)
ax17.set_title("District 17: Rockland, Westchester", fontsize=18)
ax18 = district_18_change.drop(['TOTAL'], axis=1).plot.bar(legend=True, ax=ax)
ax18.set_title("District 18: Orange, Putnam, Southern Dutchess, Northeastern Westchester", fontsize=18)
ax19 = district_19_change.drop(['TOTAL'], axis=1).plot.bar(legend=True, ax=ax)
ax19.set_title("District 19: Hudson Valley, Catskills", fontsize=18)
ax20 = district_20_change.drop(['TOTAL'], axis=1).plot.bar(legend=True, ax=ax)
ax20.set_title("District 20: Albany, Schenectady", fontsize=18)
ax21 = district_21_change.drop(['TOTAL'], axis=1).plot.bar(legend=True, ax=ax)
ax21.set_title("District 21: Clinton, Essex, Franklin, Fulton, Hamilton, Herkimer, Jefferson, Lewis, Saratoga, St. Lawrence, Warren, and Washington", fontsize=18)
ax22 = district_22_change.drop(['TOTAL'], axis=1).plot.bar(legend=True, ax=ax)
ax22.set_title("District 22: Central New York", fontsize=18)
ax23 = district_23_change.drop(['TOTAL'], axis=1).plot.bar(legend=True, ax=ax)
ax23.set_title("District 23: Western New York", fontsize=18)
ax24 = district_24_change.drop(['TOTAL'], axis=1).plot.bar(legend=True, ax=ax)
ax24.set_title("District 24: Cayuga, Onondaga, Wayne, Western Oswego", fontsize=18)
ax25 = district_25_change.drop(['TOTAL'], axis=1).plot.bar(legend=True, ax=ax)
ax25.set_title("District 25: Monroe", fontsize=18)
ax26 = district_26_change.drop(['TOTAL'], axis=1).plot.bar(legend=True, ax=ax)
ax26.set_title("District 26: Western New York: Erie, Niagara", fontsize=18)
ax27 = district_27_change.drop(['TOTAL'], axis=1).plot.bar(legend=True, ax=ax)
ax27.set_title("District 27: Western New York", fontsize=18)
# plt.tight_layout()