This is my solution to Anyalyze Data With Python project called, “Making a visual arguement: Compare Grammy Win Records”
I had a very hard time getting the annotation to show up on the chart. I think it was offscreen, so I didn’t know if I should move it up, down, left, or right. Then, I finally saw the hint, giving these coordinates… (2023.5, 3) and (1962.5, 3) .
Grammys , Solti vs Beyonce
fig = plt.figure(figsize=(8, 6), facecolor=‘aliceblue’)
fig.subplots_adjust(hspace=.5)
fig.suptitle(‘Grammy Nominations vs Wins’)
#Solti
plt.subplot(2,1,1)
plt.title(‘Georg Solti’)
plt.bar(grammys_data.year, grammys_data.solti_nominated, color=‘cornflowerblue’)
plt.bar(grammys_data.year, grammys_data.solti_won, bottom = grammys_data.solti_nominated, color=‘orange’)
plt.ylim(0,11)
plt.xlim(1961, 2025)
plt.legend((‘Nominations’, ‘Wins’), handletextpad=2, labelspacing=.25, fontsize=10)
plt.axvline(x=1999, ymin=0, ymax=1999, linestyle = ‘dashed’, color = ‘gray’)
plt.annotate('31 wins, 74 nominations, \nfrom 1963 to 1999 ', xy=(2023.5, 3), ha=‘right’)
#Beyonce
plt.subplot(2,1,2)
plt.title(‘Beyonce’)
plt.bar(grammys_data.year, grammys_data.beyonce_nominated, color=‘royalblue’)
plt.bar(grammys_data.year, grammys_data.beyonce_won, bottom=grammys_data.beyonce_nominated, color=‘pink’)
plt.ylim(0,11)
plt.xlim(1961, 2025)
plt.legend((‘Nominations’, ‘Wins’), handletextpad=2, labelspacing=.25, fontsize=10, frameon = False)
plt.axvline(x=1999, ymin=0, ymax=1999, linestyle = ‘dashed’, color = ‘gray’)
plt.annotate(‘32 wins, 88 nominations, \nfrom 2000 to today’, xy=(1962.5,3))
plt.show()