如何删除 1e6?谢谢
# my code
g=sns.scatterplot(sk_df,x='floor_area_sqm',y='resale_price',hue='flat_type',alpha=0.4,marker='o')
g.get_legend().set_title('')
plt.xlabel('Floor Area (square meter)')
plt.ylabel('Price in Millions (SGD)')
您可以使用
tick_params()
和 ticklabel_format()
:
g = sns.scatterplot(sk_df, x='floor_area_sqm', y='resale_price', hue='flat_type', alpha=0.4, marker='o')
plt.title('Title')
plt.tick_params(axis='y', which='both', left=True, right=True, labelleft=True, labelright=False)
plt.ticklabel_format(style='plain', axis='y')
plt.xlabel('Floor Area (square meter)')
plt.ylabel('Price in Millions (SGD)')
plt.show()