Project: Visualizing Race and Gender Representation in American Movies Additional Data Point

Hello,

I completed the next_bechdel project by plotting a horizontal bar chart but I want to add something to the chart. What I am trying to do is sum the number of movies that have a score of either 1, 2, or 3. I want to put this within the existing bar chart, located in the lower corner of the existing bar chart. Attached is the horizontal bar chart with a text box example of my vision for what I’m trying to do.

Total Count
One’s = 10 Movies
Two’s = 24 Movies
Three’s = 13 Movies

Below is my current code.
import matplotlib.pyplot as plt
import pandas as pd

df = pd.read_csv(‘bechdelExpanded.csv’)
df[‘total_score’] = df.bechdel + df. waithe + df.ko
df_sorted = df.sort_values(“total_score”).reset_index(drop = True)
df_partial = df_sorted[[‘movie’, ‘bechdel’, ‘waithe’, ‘ko’, ‘total_score’]]

df_movie_total_score_only = df_partial[[‘movie’,‘total_score’]]
ax = df_movie_total_score_only.set_index(‘movie’, drop=True)

ax.plot(kind = ‘barh’, title =‘Representation In Movies’, figsize=(15, 15), fontsize = 12, legend=True, xticks=ax[‘total_score’])

plt.show()