.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/02_decoding/plot_haxby_stimuli.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_02_decoding_plot_haxby_stimuli.py: Show stimuli of Haxby et al. dataset ==================================== In this script we plot an overview of the stimuli used in :footcite:t:`Haxby2001`. .. GENERATED FROM PYTHON SOURCE LINES 8-15 .. code-block:: Python from nilearn._utils.helpers import check_matplotlib check_matplotlib() import matplotlib.pyplot as plt .. GENERATED FROM PYTHON SOURCE LINES 16-22 .. code-block:: Python from nilearn import datasets from nilearn.plotting import show haxby_dataset = datasets.fetch_haxby(subjects=[], fetch_stimuli=True) stimulus_information = haxby_dataset.stimuli .. rst-class:: sphx-glr-script-out .. code-block:: none [fetch_haxby] Dataset found in /home/runner/nilearn_data/haxby2001 [fetch_haxby] Downloading data from http://data.pymvpa.org/datasets/haxby2001/stimuli-2010.01.14.tar.gz ... [fetch_haxby] ...done. (0 seconds, 0 min) [fetch_haxby] Extracting data from /home/runner/nilearn_data/haxby2001/ee9e0d5a40146477e9197f0d13da9b32/stimuli-201 0.01.14.tar.gz... [fetch_haxby] .. done. .. GENERATED FROM PYTHON SOURCE LINES 23-40 .. code-block:: Python for stim_type in stimulus_information: # skip control images, there are too many if stim_type != "controls": file_names = stimulus_information[stim_type] fig, axes = plt.subplots(6, 8) fig.suptitle(stim_type) for img_path, ax in zip(file_names, axes.ravel()): ax.imshow(plt.imread(img_path), cmap="gray") for ax in axes.ravel(): ax.axis("off") show() .. rst-class:: sphx-glr-horizontal * .. image-sg:: /auto_examples/02_decoding/images/sphx_glr_plot_haxby_stimuli_001.png :alt: houses :srcset: /auto_examples/02_decoding/images/sphx_glr_plot_haxby_stimuli_001.png :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/02_decoding/images/sphx_glr_plot_haxby_stimuli_002.png :alt: scissors :srcset: /auto_examples/02_decoding/images/sphx_glr_plot_haxby_stimuli_002.png :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/02_decoding/images/sphx_glr_plot_haxby_stimuli_003.png :alt: cats :srcset: /auto_examples/02_decoding/images/sphx_glr_plot_haxby_stimuli_003.png :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/02_decoding/images/sphx_glr_plot_haxby_stimuli_004.png :alt: shoes :srcset: /auto_examples/02_decoding/images/sphx_glr_plot_haxby_stimuli_004.png :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/02_decoding/images/sphx_glr_plot_haxby_stimuli_005.png :alt: bottles :srcset: /auto_examples/02_decoding/images/sphx_glr_plot_haxby_stimuli_005.png :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/02_decoding/images/sphx_glr_plot_haxby_stimuli_006.png :alt: faces :srcset: /auto_examples/02_decoding/images/sphx_glr_plot_haxby_stimuli_006.png :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/02_decoding/images/sphx_glr_plot_haxby_stimuli_007.png :alt: chairs :srcset: /auto_examples/02_decoding/images/sphx_glr_plot_haxby_stimuli_007.png :class: sphx-glr-multi-img .. GENERATED FROM PYTHON SOURCE LINES 41-45 References ---------- .. footbibliography:: .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 7.539 seconds) **Estimated memory usage:** 136 MB .. _sphx_glr_download_auto_examples_02_decoding_plot_haxby_stimuli.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/nilearn/nilearn/0.12.0?urlpath=lab/tree/notebooks/auto_examples/02_decoding/plot_haxby_stimuli.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_haxby_stimuli.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_haxby_stimuli.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_haxby_stimuli.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_