[SciPy-user] Plotting an array

Gael Varoquaux gael.varoquaux at normalesup.org
Tue Oct 10 11:19:50 CDT 2006


    Hi,

Can you give a complete minimum example that does not work. If I put the
following code in a file and run python on it, I get the expected result.

from scipy import *
from pylab import *
t = arange(0, 2.0, 0.1)
y = sin(2*pi*t)
tck = interpolate.splrep(t, y, s=0)
tnew = arange(0, 2.0, 0.01)
ynew = interpolate.splev(tnew, tck, der=0)
plot(t, y, 'o', tnew, ynew)
show()


Gaël


More information about the SciPy-user mailing list