.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/quickflat/plot_rois.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 .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_quickflat_plot_rois.py: ======================== Plot ROIs on the flatmap ======================== ROIs are defined as sub-layers of the `roi` layer in //overlays.svg By default, ROIs and ROI labels are displayed when a flatmap is plotted using `quickflat.make_figure`. `with_labels=False` turns off the ROI labels. `with_rois=False` turns off the ROI display. .. GENERATED FROM PYTHON SOURCE LINES 16-36 .. rst-class:: sphx-glr-horizontal * .. image-sg:: /auto_examples/quickflat/images/sphx_glr_plot_rois_001.png :alt: plot rois :srcset: /auto_examples/quickflat/images/sphx_glr_plot_rois_001.png :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/quickflat/images/sphx_glr_plot_rois_002.png :alt: plot rois :srcset: /auto_examples/quickflat/images/sphx_glr_plot_rois_002.png :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/quickflat/images/sphx_glr_plot_rois_003.png :alt: plot rois :srcset: /auto_examples/quickflat/images/sphx_glr_plot_rois_003.png :class: sphx-glr-multi-img .. rst-class:: sphx-glr-script-out .. code-block:: none Background RRGGBBAA: ffffff00 Area 0:0:1960.5:1024 exported to 1960 x 1024 pixels (96 dpi) Background RRGGBBAA: ffffff00 Area 0:0:1960.5:1024 exported to 1960 x 1024 pixels (96 dpi) | .. code-block:: Python import cortex import numpy as np import matplotlib.pyplot as plt np.random.seed(1234) # Create a random pycortex Volume volume = cortex.Volume.random(subject='S1', xfmname='fullhead') # Plot a flatmap with the data projected onto the surface # By default the ROIs and their labels will be displayed _ = cortex.quickflat.make_figure(volume) plt.show() # Turn off the ROI labels _ = cortex.quickflat.make_figure(volume, with_labels=False) plt.show() # Turn off the ROIs _ = cortex.quickflat.make_figure(volume, with_rois=False) plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 3.855 seconds) .. _sphx_glr_download_auto_examples_quickflat_plot_rois.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_rois.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_rois.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_