.. 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_atlas.py: Basic Atlas plotting ======================= Plot the regions of a reference atlas (here the Harvard-Oxford atlas). Retrieving the atlas data ------------------------- .. code-block:: default from nilearn import datasets dataset = datasets.fetch_atlas_harvard_oxford('cort-maxprob-thr25-2mm') atlas_filename = dataset.maps print('Atlas ROIs are located at: %s' % atlas_filename) .. rst-class:: sphx-glr-script-out Out: .. code-block:: none Atlas ROIs are located at: /home/varoquau/nilearn_data/fsl/data/atlases/HarvardOxford/HarvardOxford-cort-maxprob-thr25-2mm.nii.gz Visualizing the Harvard-Oxford atlas ------------------------------------ .. code-block:: default from nilearn import plotting plotting.plot_roi(atlas_filename, title="Harvard Oxford atlas") .. image:: /auto_examples/01_plotting/images/sphx_glr_plot_atlas_001.png :alt: plot atlas :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none Visualizing the Harvard-Oxford atlas with contours -------------------------------------------------- .. code-block:: default plotting.plot_roi(atlas_filename, view_type='contours', title="Harvard Oxford atlas in contours") plotting.show() .. image:: /auto_examples/01_plotting/images/sphx_glr_plot_atlas_002.png :alt: plot atlas :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none /home/varoquau/dev/nilearn/nilearn/plotting/displays.py:97: UserWarning: No contour levels were found within the data range. im = getattr(ax, type)(data_2d.copy(), .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 8.513 seconds) .. _sphx_glr_download_auto_examples_01_plotting_plot_atlas.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: binder-badge .. image:: https://mybinder.org/badge_logo.svg :target: https://mybinder.org/v2/gh/nilearn/nilearn.github.io/master?filepath=examples/auto_examples/01_plotting/plot_atlas.ipynb :width: 150 px .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_atlas.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_atlas.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_