📌  相关文章
📜  如何在 barplot seaborn 中的条形顶部显示值 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:10.942000             🧑  作者: Mango

代码示例1
# if you have single graph
ax = sns.countplot(x='User', data=df)
ax.bar_label(ax.containers[0])

# if you have subplots or multiple graphs
ax = sns.countplot(x='User', hue='C', data=df)
for container in ax.containers:
    ax.bar_label(container)