Python Matplotlib y轴值不显示我的数据?

Python Matplotlib y轴值不显示我的数据?,python,dataframe,matplotlib,plot,scatter-plot,Python,Dataframe,Matplotlib,Plot,Scatter Plot,在我的数据集中,我有这样一个薪水列 array([[ 45000], [ 50000], [ 60000], [ 80000], [ 110000], [ 150000], [ 200000], [ 300000], [ 500000], [1000000]], dtype=int64) 当我尝试使用“散射”绘制此图时,输出如图所示 plt.scatter(features,label) 我所期望的是这样的 我是初学者。请解决

在我的数据集中,我有这样一个薪水列

array([[  45000],
   [  50000],
   [  60000],
   [  80000],
   [ 110000],
   [ 150000],
   [ 200000],
   [ 300000],
   [ 500000],
   [1000000]], dtype=int64)
当我尝试使用“散射”绘制此图时,输出如图所示

plt.scatter(features,label)

我所期望的是这样的

我是初学者。请解决我的困惑。

回答

from pylab import *

plt.scatter([0,1,2,3,4,5],[10001,10002,10003,10004,10005,10006]);
gca().yaxis.set_major_formatter(mpl.ticker.StrMethodFormatter('{x:,.0f}'))