[SciPy-user] Plotting an array

Stefan van der Walt stefan at sun.ac.za
Tue Oct 10 12:39:13 CDT 2006


On Tue, Oct 10, 2006 at 06:15:21PM +0200, Steve Schmerler wrote:
> >   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()
> > 
> 
> PS: Rather unimportant note to the scipy guys:
> 
> In [27]: len(tck)
> Out[27]: 3
> In [28]: type(tck)
> Out[28]: <type 'list'>
> 
> The splrep docstring says tck is a len 3 tuple, not a list ...

Fixed in SVN.

Cheers
Stéfan


More information about the SciPy-user mailing list