小编gum*_*ain的帖子

如何摆脱 matplotlib 中条形标签上的科学记数法?

如何设置条形标签的格式以删除科学记数法?

highest_enrollment = course_data.groupby(
    "course_organization")["course_students_enrolled"].sum().nlargest(10)

ax = sns.barplot(x=highest_enrollment.index, 
                 y=highest_enrollment.values, 
                 ci=None, 
                 palette="ch: s=.5, r=-.5")

ax.ticklabel_format(style='plain', axis="y")

plt.xticks(rotation=90)

ax.bar_label(ax.containers[0])

plt.show()
Run Code Online (Sandbox Code Playgroud)

条形图

python plot visualization matplotlib seaborn

5
推荐指数
1
解决办法
2377
查看次数

标签 统计

matplotlib ×1

plot ×1

python ×1

seaborn ×1

visualization ×1