I am trying to plot some data using pylab scatter function. I’m using
pylab.scatter(X, Y)
pylab.show()
X and Y are python lists where each element is << int >> datatype. When I plot the graph using the above, I get a straight line graph. However, when I use excel to plot the same data, it is a long tailed graph. The correct distribution is the long tail. Why am I then getting a straight line when using pylab?
Apology! The issue was not related to pylab.
The problem was that I had initialized X and Y as –
Due to this, whatever values I inserted in list Y, it became same as X. And hence the straight line.