def get_plot(sc, cn, isQuarter=True) -> io.BytesIO:
    query = database.get_query()
    database.isQuarter(isQuarter, query)
    database.subject_code(sc, query)
    database.course_number(cn, query)
    q = database.execute(query)
    q = filter_function(map(get_section, q))
    keys = range(0, len(q))
    vals = [x[1] for x in q]
    buffer = io.BytesIO()
    plt.plot(keys, vals)
    plt.xticks(np.arange(len(q)), [f"{x[0][0]} '{x[0][1]}" for x in q])
    plt.savefig(buffer, format='png')
    buffer.seek(0)
    plt.close()
    return buffer
def get_plot(sc, cn, isQuarter=True) -> io.BytesIO:
    query = database.get_query()
    database.isQuarter(isQuarter, query)
    database.subject_code(sc, query)
    database.course_number(cn, query)
    q = database.execute(query)
    q = filter_function(map(get_section, q))
    keys = range(0, len(q))
    vals = [x[1] for x in q]
    buffer = io.BytesIO()
    plt.plot(keys, vals)
    plt.xticks(np.arange(len(q)), [f"{x[0][0]} '{x[0][1]}" for x in q])
    plt.savefig(buffer, format='png')
    buffer.seek(0)
    plt.close()
    return buffer