plt.style.use("tableau-colorblind10") plt.bar(x, y1, label="HR") plt.bar(x, y2, bottom=y1, label="Engineering") plt.bar(x, y3, bottom=y1 + y2, label="Marketing") plt.bar(x, y4, bottom=y1 + y2 + y3, label="Sales") plt.title("[DO] Employee Count Per Location And Department", loc="left", fontdict={"weight": "bold"}, y=1.06) plt.xlabel("Office Location") plt.ylabel("Count") plt.legend(loc="upper right", ncol=4) plt.ylim(top=320) plt.show()