.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/data/plot_specific.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code or to run this example in your browser via Binder .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_data_plot_specific.py: =============== Specific images =============== .. GENERATED FROM PYTHON SOURCE LINES 7-14 .. code-block:: default import matplotlib.pyplot as plt import matplotlib from skimage import data matplotlib.rcParams["font.size"] = 18 .. GENERATED FROM PYTHON SOURCE LINES 15-17 Stereo images ============= .. GENERATED FROM PYTHON SOURCE LINES 18-31 .. code-block:: default fig, axes = plt.subplots(1, 2, figsize=(8, 4)) ax = axes.ravel() cycle_images = data.stereo_motorcycle() ax[0].imshow(cycle_images[0]) ax[1].imshow(cycle_images[1]) fig.tight_layout() plt.show() .. image-sg:: /auto_examples/data/images/sphx_glr_plot_specific_001.png :alt: plot specific :srcset: /auto_examples/data/images/sphx_glr_plot_specific_001.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 32-34 PIV images ============= .. GENERATED FROM PYTHON SOURCE LINES 35-48 .. code-block:: default fig, axes = plt.subplots(1, 2, figsize=(8, 4)) ax = axes.ravel() vortex_images = data.vortex() ax[0].imshow(vortex_images[0]) ax[1].imshow(vortex_images[1]) fig.tight_layout() plt.show() .. image-sg:: /auto_examples/data/images/sphx_glr_plot_specific_002.png :alt: plot specific :srcset: /auto_examples/data/images/sphx_glr_plot_specific_002.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 49-53 Faces and non-faces dataset =========================== A sample of 20 over 200 images is displayed. .. GENERATED FROM PYTHON SOURCE LINES 54-66 .. code-block:: default fig, axes = plt.subplots(4, 5, figsize=(20, 20)) ax = axes.ravel() lfw_images = data.lfw_subset() for i in range(20): ax[i].imshow(lfw_images[90 + i], cmap=plt.cm.gray) ax[i].axis("off") fig.tight_layout() plt.show() .. image-sg:: /auto_examples/data/images/sphx_glr_plot_specific_003.png :alt: plot specific :srcset: /auto_examples/data/images/sphx_glr_plot_specific_003.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 67-68 Thumbnail image for the gallery .. GENERATED FROM PYTHON SOURCE LINES 68-106 .. code-block:: default from matplotlib.offsetbox import AnchoredText # Create a gridspec with two images in the first and 4 in the second row fig, axd = plt.subplot_mosaic( [["stereo", "stereo", "piv", "piv"], ["lfw0", "lfw1", "lfw2", "lfw3"]], ) axd["stereo"].imshow(cycle_images[0]) axd["stereo"].add_artist( AnchoredText( "Stereo", prop=dict(size=20), frameon=True, borderpad=0, loc="upper left", ) ) axd["piv"].imshow(vortex_images[0]) axd["piv"].add_artist( AnchoredText( "PIV", prop=dict(size=20), frameon=True, borderpad=0, loc="upper left", ) ) axd["lfw0"].imshow(lfw_images[91], cmap="gray") axd["lfw1"].imshow(lfw_images[92], cmap="gray") axd["lfw2"].imshow(lfw_images[93], cmap="gray") axd["lfw3"].imshow(lfw_images[94], cmap="gray") for ax in axd.values(): ax.axis("off") fig.tight_layout() plt.show() .. image-sg:: /auto_examples/data/images/sphx_glr_plot_specific_004.png :alt: plot specific :srcset: /auto_examples/data/images/sphx_glr_plot_specific_004.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 2.936 seconds) .. _sphx_glr_download_auto_examples_data_plot_specific.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: binder-badge .. image:: images/binder_badge_logo.svg :target: https://mybinder.org/v2/gh/scikit-image/scikit-image/v0.22.x?filepath=notebooks/auto_examples/data/plot_specific.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_specific.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_specific.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_