.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/01_plotting/plot_demo_glass_brain.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` 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_01_plotting_plot_demo_glass_brain.py: Glass brain plotting in nilearn =============================== See :ref:`plotting` for more plotting functionalities. .. GENERATED FROM PYTHON SOURCE LINES 10-12 Retrieve data from Internet --------------------------- .. GENERATED FROM PYTHON SOURCE LINES 12-18 .. code-block:: default from nilearn import datasets motor_images = datasets.fetch_neurovault_motor_task() stat_img = motor_images.images[0] .. GENERATED FROM PYTHON SOURCE LINES 19-21 Glass brain plotting: whole brain sagittal cuts ----------------------------------------------- .. GENERATED FROM PYTHON SOURCE LINES 21-26 .. code-block:: default from nilearn import plotting plotting.plot_glass_brain(stat_img, threshold=3) .. image-sg:: /auto_examples/01_plotting/images/sphx_glr_plot_demo_glass_brain_001.png :alt: plot demo glass brain :srcset: /auto_examples/01_plotting/images/sphx_glr_plot_demo_glass_brain_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 27-31 Glass brain plotting: black background -------------------------------------- On a black background (option "black_bg"), and with only the x and the z view (option "display_mode"). .. GENERATED FROM PYTHON SOURCE LINES 31-35 .. code-block:: default plotting.plot_glass_brain( stat_img, title='plot_glass_brain', black_bg=True, display_mode='xz', threshold=3) .. image-sg:: /auto_examples/01_plotting/images/sphx_glr_plot_demo_glass_brain_002.png :alt: plot demo glass brain :srcset: /auto_examples/01_plotting/images/sphx_glr_plot_demo_glass_brain_002.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 36-38 Glass brain plotting: Hemispheric sagittal cuts ----------------------------------------------- .. GENERATED FROM PYTHON SOURCE LINES 38-43 .. code-block:: default plotting.plot_glass_brain(stat_img, title='plot_glass_brain with display_mode="lyrz"', display_mode='lyrz', threshold=3) plotting.show() .. image-sg:: /auto_examples/01_plotting/images/sphx_glr_plot_demo_glass_brain_003.png :alt: plot demo glass brain :srcset: /auto_examples/01_plotting/images/sphx_glr_plot_demo_glass_brain_003.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 2.639 seconds) **Estimated memory usage:** 17 MB .. _sphx_glr_download_auto_examples_01_plotting_plot_demo_glass_brain.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: binder-badge .. image:: images/binder_badge_logo.svg :target: https://mybinder.org/v2/gh/nilearn/nilearn.github.io/main?filepath=examples/auto_examples/01_plotting/plot_demo_glass_brain.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_demo_glass_brain.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_demo_glass_brain.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_