html
Note
Click here <sphx_glr_download_auto_examples_plot_tutorial_04.py>
to download the full example code
sphx-glr-example-title
This tutorial covers the layout and view options provided by surfplot
.
For variety, let's import the left and right Conte69 midthickness surface directly using ~brainspace.datasets.load_conte69
. Then, we'll make a blank surface plot using the default layout and view, which is a 2x2 'grid' of lateral and medial views that is identical to the default setup in Connectome Workbench.
/auto_examples/images/sphx_glr_plot_tutorial_04_001.png
The layout can be adjusted with the layout parameter, and has 3 options: 'grid' (default, shown above), 'row', or 'column'. The size and zoom parameters will have to be adjusted based on the layout and number of views.
Above we see that 'grid' gives us a views-by-hemisphere grid, where the left hemisphere is the left column and the right hemisphere is the right column. Meanwhile, the 'row' layout gives a single horizontal row of brains:
/auto_examples/images/sphx_glr_plot_tutorial_04_002.png
The 'column' layout gives a single vertical column of brains.
/auto_examples/images/sphx_glr_plot_tutorial_04_003.png
As well, it's also possible to plot just one hemisphere. If the layout is set as default ('grid'), then a single hemisphere is plotted as row:
/auto_examples/images/sphx_glr_plot_tutorial_04_004.png
surfplot
makes it easy to configure the view(s) you wish to use. One or more views can be specified through the views parameter. As we've seen before, the default is to include lateral and medial views. It is also possible to show just one view:
/auto_examples/images/sphx_glr_plot_tutorial_04_005.png
It is also possible to show more than just lateral and medial views, such as 'posterior'. Note that views are plotted in order in which they appear in the list:
/auto_examples/images/sphx_glr_plot_tutorial_04_006.png
All possible views are shown here (the right hemisphere for brevity):
/auto_examples/images/sphx_glr_plot_tutorial_04_007.png
Views can also be mirrored when both hemipsheres are plotted and layout is either 'row' or 'column'. Specifically, the right hemisphere view order is reversed. For example, plotting default lateral and medial views and setting mirror_views=True will situate the medial views in the middle for a symmetrical figure:
/auto_examples/images/sphx_glr_plot_tutorial_04_008.png
Finally, it is possible to flip the left and right hemisphere. This is useful when plotting just the 'anterior' or 'ventral' for both hemispheres. For example:
/auto_examples/images/sphx_glr_plot_tutorial_04_009.png
sphx-glr-timing
Total running time of the script: ( 0 minutes 0.961 seconds)
html
Download Python source code: plot_tutorial_04.py <plot_tutorial_04.py>
Download Jupyter notebook: plot_tutorial_04.ipynb <plot_tutorial_04.ipynb>
html
sphx-glr-signature