CodePudding user response:
Just do:
import matplotlib.pyplot as plt
df2.plot.barh('ID', ['match', 'total'], stacked=True, xticks=[5, 30])
plt.show()
Output:
CodePudding user response:
So I've done it myself in matplotlib:
ax = df2.plot(x="ID", y="total", kind="barh")
df2.plot(x="ID", y="match", kind="barh", ax=ax, color="C2")
But would still prefer in seaborn: