def plot_line(legend_pos: tuple = (1.25, 1)): x = [2018, 2019, 2020, 2021, 2023] ny = [100, 124, 154, 133, 167] sf = [89, 95, 109, 139, 155] la = [107, 144, 179, 161, 175] ch = [59, 91, 99, 117, 141] mi = [121, 99, 104, 131, 140] plt.plot(x, ny, label="New York") plt.plot(x, sf, label="San Francisco") plt.plot(x, la, label="Los Angeles") plt.plot(x, ch, label="Chicago") plt.plot(x, mi, label="Miami") plt.title("Yearly Revenue", y=1.06) plt.xlabel("Year") plt.ylabel("Revenue (M)") plt.legend(bbox_to_anchor=legend_pos) plt.show()