Menu

[r4448]: / branches / transforms / examples / interp_demo.py  Maximize  Restore  History

Download this file

15 lines (11 with data), 315 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
from matplotlib.pyplot import figure, show
from numpy import pi, sin, linspace
from matplotlib.mlab import stineman_interp
x = linspace(0,2*pi,20);
y = sin(x); yp = None
xi = linspace(x[0],x[-1],100);
yi = stineman_interp(xi,x,y,yp);
fig = figure()
ax = fig.add_subplot(111)
ax.plot(x,y,'ro',xi,yi,'-b.')
show()
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.