Giving credit

Previous topic

8.2.1. Basic Atlas plotting

Next topic

8.2.3. Visualizing Megatrawls Network Matrices from Human Connectome Project

8.2.2. Glass brain plotting in nilearnΒΆ

See Plotting brain images for more plotting functionalities.

Retrieve data from Internet

from nilearn import datasets

localizer_dataset = datasets.fetch_localizer_button_task()
localizer_tmap_filename = localizer_dataset.tmaps[0]

Demo glass brain plotting using whole brain sagittal cuts

from nilearn import plotting

plotting.plot_glass_brain(localizer_tmap_filename, threshold=3)

On a black background (option “black_bg”), and with only the x and the z view (option “display_mode”).

    localizer_tmap_filename, title='plot_glass_brain',
    black_bg=True, display_mode='xz', threshold=3)

Hemispheric sagittal cuts

                          title='plot_glass_brain with display_mode="lyrz"',
                          display_mode='lyrz', threshold=3)

Total running time of the script: ( 0 minutes 2.434 seconds)

Generated by Sphinx-Gallery