-2

In my dataset, I have a salary column like this

array([[  45000],
   [  50000],
   [  60000],
   [  80000],
   [ 110000],
   [ 150000],
   [ 200000],
   [ 300000],
   [ 500000],
   [1000000]], dtype=int64)

When I try to plot this using scatter the output come as shown in figure.

plt.scatter(features,label)

enter image description here

What I expected is like this.

enter image description here

I'm a beginner. Please solve my confusion.

ARUN BALAJI
  • 127
  • 1
  • 15

1 Answers1

-1

Answered here

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}'))