In [2]:
import matplotlib.pyplot as plt
%matplotlib inline 

def main():
    fall_enrollments = [489, 547, 705, 879, 1075, 1228, 1404, 1550, 1773, 1959]
    terms =["F2010","F2011","F2012","F2013","F2014","F2015","F2016","F2017","F2018","F2019"]
    xaxis = range(len(terms))
    plt.figure(figsize=(16,8)) 
    plt.title("Fall Undergrad Enrollments in Computer Science ")
    plt.xlabel("Term")
    plt.ylabel("Undergrad Enrollment")
    plt.bar(xaxis, fall_enrollments, width=0.5)
    plt.xticks(xaxis, terms)
    for a,b in zip(xaxis, fall_enrollments):
        plt.text(a, b+30, str(b), horizontalalignment='center', verticalalignment='center')
    plt.show()

main()
In [ ]: