.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/quickflat/plot_advanced_compositing.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_advanced_compositing.py: ============================== Plot with advanced compositing ============================== The way flatmap plotting works in pycortex is to create different image layers (data, ROIs, sulci, etc) and overlay each on top of the other. Usually, quickflat.make_figure() handles all this for you, but each layer can be manipulated independently for fancier effects with the quickflat.composite sub-module. .. GENERATED FROM PYTHON SOURCE LINES 12-48 .. image-sg:: /auto_examples/quickflat/images/sphx_glr_plot_advanced_compositing_001.png :alt: plot advanced compositing :srcset: /auto_examples/quickflat/images/sphx_glr_plot_advanced_compositing_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none Failed to get connection ** (inkscape:5421): CRITICAL **: 01:31:23.379: dbus_g_proxy_new_for_name: assertion 'connection != NULL' failed ** (inkscape:5421): CRITICAL **: 01:31:23.379: dbus_g_proxy_call: assertion 'DBUS_IS_G_PROXY (proxy)' failed ** (inkscape:5421): CRITICAL **: 01:31:23.379: dbus_g_connection_register_g_object: assertion 'connection != NULL' failed Failed to get connection ** (inkscape:5424): CRITICAL **: 01:31:24.128: dbus_g_proxy_new_for_name: assertion 'connection != NULL' failed ** (inkscape:5424): CRITICAL **: 01:31:24.128: dbus_g_proxy_call: assertion 'DBUS_IS_G_PROXY (proxy)' failed ** (inkscape:5424): CRITICAL **: 01:31:24.128: dbus_g_connection_register_g_object: assertion 'connection != NULL' failed Failed to get connection ** (inkscape:5427): CRITICAL **: 01:31:24.950: dbus_g_proxy_new_for_name: assertion 'connection != NULL' failed ** (inkscape:5427): CRITICAL **: 01:31:24.950: dbus_g_proxy_call: assertion 'DBUS_IS_G_PROXY (proxy)' failed ** (inkscape:5427): CRITICAL **: 01:31:24.950: dbus_g_connection_register_g_object: assertion 'connection != NULL' failed | .. code-block:: default import cortex import matplotlib.pyplot as plt # Create a random volume volume = cortex.Volume.random(subject='S1', xfmname='fullhead') # Create basic figure, with rois, labels, sulci all off fig = cortex.quickflat.make_figure(volume, with_curvature=True, with_rois=False, with_labels=False, with_sulci=False) # Add sulci in light yellow _ = cortex.quickflat.composite.add_sulci(fig, volume, with_labels=False, linewidth=2, linecolor=(0.9, 0.85, 0.5)) # Add all rois, with a particular color scheme: _ = cortex.quickflat.composite.add_rois(fig, volume, with_labels=False, linewidth=1, linecolor=(0.8, 0.8, 0.8)) # Highlight face- and body-selective ROIs: _ = cortex.quickflat.composite.add_rois(fig, volume, roi_list=['FFA', 'EBA', 'OFA'], # (This defaults to all rois if not specified) with_labels=True, linewidth=5, linecolor=(0.9, 0.5, 0.5), labelcolor=(0.9, 0.5, 0.5), labelsize=20, roifill=(0.9, 0.5, 0.5), fillalpha=0.35, dashes=(5, 3) # Dash length & gap btw dashes ) plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 5.141 seconds) .. _sphx_glr_download_auto_examples_quickflat_plot_advanced_compositing.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_advanced_compositing.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_advanced_compositing.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_