Python 如何去掉这个.plot.bar()图形y轴上的科学符号?

Python 如何去掉这个.plot.bar()图形y轴上的科学符号?,python,pandas,matplotlib,Python,Pandas,Matplotlib,我尝试使用plt.ticklabel\u格式(style='plain'),但由于图形是使用pandas创建的,df.plot.bar(),因此无法工作。我如何才能做到这一点?使用以下代码: ax = df.plot.bar(x="Place", y="Amount", rot=30, title="Amount of ...", legend=False) ax.ticklabel_format(style='plain', axis

我尝试使用
plt.ticklabel\u格式(style='plain')
,但由于图形是使用pandas创建的,
df.plot.bar()
,因此无法工作。我如何才能做到这一点?

使用以下代码:

ax = df.plot.bar(x="Place", y="Amount", rot=30, title="Amount of ...", legend=False)
ax.ticklabel_format(style='plain', axis='y');
当然,传递到df.plot.bar的参数是根据我的源数据。 根据您的环境设置它们

重要的是:

  • 将df.plot.bar的结果保存在变量(轴对象)中
  • 仅为y轴设置记号标签格式