.. 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-15 .. code-block:: Python import matplotlib.pyplot as plt import matplotlib from skimage import data matplotlib.rcParams["font.size"] = 18 .. GENERATED FROM PYTHON SOURCE LINES 16-18 Stereo images ============= .. GENERATED FROM PYTHON SOURCE LINES 19-32 .. code-block:: Python 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 33-35 PIV images ============= .. GENERATED FROM PYTHON SOURCE LINES 36-49 .. code-block:: Python 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 50-54 Faces and non-faces dataset =========================== A sample of 20 over 200 images is displayed. .. GENERATED FROM PYTHON SOURCE LINES 55-67 .. code-block:: Python 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 68-69 Thumbnail image for the gallery .. GENERATED FROM PYTHON SOURCE LINES 69-107 .. code-block:: Python 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 1.886 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.24.0?filepath=notebooks/auto_examples/data/plot_specific.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_specific.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_specific.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_