.. _sphx_glr_gallery_lines_bars_and_markers_interp_demo.py: =========== Interp Demo =========== .. image:: /gallery/lines_bars_and_markers/images/sphx_glr_interp_demo_001.png :align: center .. code-block:: python 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() .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: binder-badge .. image:: https://static.mybinder.org/badge.svg :target: https://mybinder.org/v2/gh/choldgraf/matplotlib/gh-pages?filepath=_downloads/interp_demo.ipynb :width: 150 px .. container:: sphx-glr-download :download:`Download Python source code: interp_demo.py ` .. container:: sphx-glr-download :download:`Download Jupyter notebook: interp_demo.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_