.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/01_plotting/plot_multiscale_parcellations.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_01_plotting_plot_multiscale_parcellations.py: Visualizing multiscale functional brain parcellations ===================================================== This example shows how to download and fetch brain parcellations of multiple networks using :func:`~nilearn.datasets.fetch_atlas_basc_multiscale_2015` and visualize them using plotting function :func:`~nilearn.plotting.plot_roi`. We show here only three different networks of 'symmetric' version. For more details about different versions and different networks, please refer to its documentation. .. GENERATED FROM PYTHON SOURCE LINES 16-18 Retrieving multiscale group brain parcellations ----------------------------------------------- .. GENERATED FROM PYTHON SOURCE LINES 18-33 .. code-block:: Python # import datasets module and use `fetch_atlas_basc_multiscale_2015` function from nilearn.datasets import fetch_atlas_basc_multiscale_2015 parcellations = [ fetch_atlas_basc_multiscale_2015(version="sym", resolution=64), fetch_atlas_basc_multiscale_2015(version="sym", resolution=197), fetch_atlas_basc_multiscale_2015(version="sym", resolution=444), ] # We show here networks of 64, 197, 444 networks_64 = parcellations[0]["maps"] networks_197 = parcellations[1]["maps"] networks_444 = parcellations[2]["maps"] .. rst-class:: sphx-glr-script-out .. code-block:: none [fetch_atlas_basc_multiscale_2015] Dataset created in /home/runner/nilearn_data/basc_multiscale_2015 [fetch_atlas_basc_multiscale_2015] Downloading data from https://ndownloader.figshare.com/files/1861819 ... [fetch_atlas_basc_multiscale_2015] ...done. (1 seconds, 0 min) [fetch_atlas_basc_multiscale_2015] Extracting data from /home/runner/nilearn_data/basc_multiscale_2015/5fd26f33e54da6efc0bc7eca321ad622/ 1861819... [fetch_atlas_basc_multiscale_2015] .. done. [fetch_atlas_basc_multiscale_2015] Dataset found in /home/runner/nilearn_data/basc_multiscale_2015 [fetch_atlas_basc_multiscale_2015] Dataset found in /home/runner/nilearn_data/basc_multiscale_2015 .. GENERATED FROM PYTHON SOURCE LINES 34-36 Visualizing brain parcellations ------------------------------- .. GENERATED FROM PYTHON SOURCE LINES 36-49 .. code-block:: Python # import plotting module and use `plot_roi` function, since the maps are in 3D from nilearn.plotting import plot_roi, show # The coordinates of all plots are selected automatically by itself # We manually change the colormap of our choice plot_roi(networks_64, cmap="bwr", title="64 regions of brain clusters") plot_roi(networks_197, cmap="bwr", title="197 regions of brain clusters") plot_roi(networks_444, cmap="bwr_r", title="444 regions of brain clusters") show() .. rst-class:: sphx-glr-horizontal * .. image-sg:: /auto_examples/01_plotting/images/sphx_glr_plot_multiscale_parcellations_001.png :alt: plot multiscale parcellations :srcset: /auto_examples/01_plotting/images/sphx_glr_plot_multiscale_parcellations_001.png :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/01_plotting/images/sphx_glr_plot_multiscale_parcellations_002.png :alt: plot multiscale parcellations :srcset: /auto_examples/01_plotting/images/sphx_glr_plot_multiscale_parcellations_002.png :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/01_plotting/images/sphx_glr_plot_multiscale_parcellations_003.png :alt: plot multiscale parcellations :srcset: /auto_examples/01_plotting/images/sphx_glr_plot_multiscale_parcellations_003.png :class: sphx-glr-multi-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 4.654 seconds) **Estimated memory usage:** 108 MB .. _sphx_glr_download_auto_examples_01_plotting_plot_multiscale_parcellations.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/01_plotting/plot_multiscale_parcellations.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_multiscale_parcellations.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_multiscale_parcellations.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_multiscale_parcellations.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_