如何更改 y 轴值以显示完整位数?
import seaborn as sns
sns.boxplot (x="waterfront", y="price", data=df)
我希望显示完整的数字范围(如屏幕截图“目标”),但我创建的箱线图显示了一个带注释的数字(如屏幕截图“当前”)。
目标:
当前:
答案 0 :(得分:0)
从这里查看答案:Seaborn / Matplotlib: How to repress scientific notation in factorplot y-axis
这是您需要的代码:
import seaborn as sns
import matplotlib.pyplot as plt
sns.boxplot (x="waterfront", y="price", data=df)
plt.ticklabel_format(style='plain', axis='y',useOffset=False)