ax = df.plot(kind="barh", colormap=cmap_discrete, width=0.8, edgecolor="#000000", stacked=True) for container in ax.containers: ax.bar_label(container, label_type="center", fontsize=10, color="#FFFFFF", fontweight="bold") plt.title("Employee Count Per Location And Department", loc="left", fontdict={"weight": "bold"}, y=1.06) plt.xlabel("Office Location") plt.ylabel("Count") plt.show()