You are reading an old version of the documentation (v2.1.1). For the latest version see https://matplotlib.org/stable/
matplotlib
Fork me on GitHub


Travis-CI:

Related Topics

This Page

Interp DemoΒΆ

../../_images/sphx_glr_interp_demo_001.png
import matplotlib.pyplot as plt
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, ax = plt.subplots()
ax.plot(x, y, 'o', xi, yi, '.')
plt.show()

Total running time of the script: ( 0 minutes 0.017 seconds)

Gallery generated by Sphinx-Gallery