.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/quickflat/plot_cutouts.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_quickflat_plot_cutouts.py: =========================== Plot cutouts on the flatmap =========================== Cutouts are manually generated cuts of the cortical surface to highlight a region of interest. Cutouts are defined as sub-layers of the `cutouts` layer in //overlays.svg. The parameter `cutout` of the `quickflat.make_figure` method should be the name of the flatmap cutout defined in the `overlays.svg` file. .. GENERATED FROM PYTHON SOURCE LINES 16-31 .. image-sg:: /auto_examples/quickflat/images/sphx_glr_plot_cutouts_001.png :alt: plot cutouts :srcset: /auto_examples/quickflat/images/sphx_glr_plot_cutouts_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none Failed to get connection ** (inkscape:5248): CRITICAL **: 01:28:04.376: dbus_g_proxy_new_for_name: assertion 'connection != NULL' failed ** (inkscape:5248): CRITICAL **: 01:28:04.376: dbus_g_proxy_call: assertion 'DBUS_IS_G_PROXY (proxy)' failed ** (inkscape:5248): CRITICAL **: 01:28:04.376: dbus_g_connection_register_g_object: assertion 'connection != NULL' failed Failed to get connection ** (inkscape:5251): CRITICAL **: 01:28:05.243: dbus_g_proxy_new_for_name: assertion 'connection != NULL' failed ** (inkscape:5251): CRITICAL **: 01:28:05.243: dbus_g_proxy_call: assertion 'DBUS_IS_G_PROXY (proxy)' failed ** (inkscape:5251): CRITICAL **: 01:28:05.243: dbus_g_connection_register_g_object: assertion 'connection != NULL' failed | .. code-block:: default import cortex import numpy as np np.random.seed(1234) # Name of a sub-layer of the 'cutouts' layer in overlays.svg file cutout_name = "VisualCortexRight" # Create a random pycortex Volume volume = cortex.Volume.random(subject='S1', xfmname='fullhead') # Plot a flatmap with the data projected onto the surface # Highlight the curvature and which cutout to be displayed _ = cortex.quickflat.make_figure(volume, with_curvature=True, cutout=cutout_name) .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 2.057 seconds) .. _sphx_glr_download_auto_examples_quickflat_plot_cutouts.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_cutouts.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_cutouts.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_