First of all, I sometimes had better success doing
from matplotlib import pyplot
instead of using pylab, although this should not matter in this case.
I think your actual problem may be that the points are plotted but not visible. It’s best to build all the points at once using the list:
xPoints = []
yPoints = []
for x in range(1,500):
y = random.randint(1,25000)
xPoints.append(x)
yPoints.append(y)
pyplot.plot(xPoints, yPoints)
pyplot.show()
, :
xPoints = range(1,500)
yPoints = [random.randint(1,25000) for _ in range(1,500)]
pyplot.plot(xPoints, yPoints)
pyplot.show()