I have a very simple code but at the end i found problem which I couldn't solve or find any solution. I can't draw plot. All I get is error AttributeError: 'numpy.float64' object has no attribute 'plot'
import pylab as p
import numpy as np
import sympy as s
import matplotlib
from random import random
X=np.arange(0,1000)
y=np.random.randint(100,size=1000)
if len(X)==len(y):
print "ok"
else:
print "not ok"
polyfit=np.polyfit(X,y,6)
poly1d=np.poly1d(polyfit)
print poly1d
i=1
my=[]
for i in X:
p=poly1d(i)
my.append(p)
print my
p.plot(X,my)
p.show()
I look after docs but I found nothing,google also can't help me.