How can I connect scatter points using matplotlib.pyplot this is my code
x = data
y = pdf
plt.scatter(x, y)
plt.show
I am getting this plot
But I want it to be like this
I tried to replace
plt.scatter(x, y)
by
plt.plot(x, y)
but I got something different


