.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "advanced/image_processing/auto_examples/plot_interpolation_face.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end <sphx_glr_download_advanced_image_processing_auto_examples_plot_interpolation_face.py>` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_advanced_image_processing_auto_examples_plot_interpolation_face.py: Image interpolation ===================== The example demonstrates image interpolation on a Raccoon face. .. GENERATED FROM PYTHON SOURCE LINES 7-25 .. image-sg:: /advanced/image_processing/auto_examples/images/sphx_glr_plot_interpolation_face_001.png :alt: plot interpolation face :srcset: /advanced/image_processing/auto_examples/images/sphx_glr_plot_interpolation_face_001.png :class: sphx-glr-single-img .. code-block:: Python import scipy as sp import matplotlib.pyplot as plt f = sp.datasets.face(gray=True) plt.figure(figsize=(8, 4)) plt.subplot(1, 2, 1) plt.imshow(f[320:340, 510:530], cmap="gray") plt.axis("off") plt.subplot(1, 2, 2) plt.imshow(f[320:340, 510:530], cmap="gray", interpolation="nearest") plt.axis("off") plt.subplots_adjust(wspace=0.02, hspace=0.02, top=1, bottom=0, left=0, right=1) plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.173 seconds) .. _sphx_glr_download_advanced_image_processing_auto_examples_plot_interpolation_face.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_interpolation_face.ipynb <plot_interpolation_face.ipynb>` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_interpolation_face.py <plot_interpolation_face.py>` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_interpolation_face.zip <plot_interpolation_face.zip>` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_