diff --git a/docs/auto_examples/examples/plot_example_01.rst b/docs/auto_examples/examples/plot_example_01.rst index c252c5d..400e370 100644 --- a/docs/auto_examples/examples/plot_example_01.rst +++ b/docs/auto_examples/examples/plot_example_01.rst @@ -79,7 +79,7 @@ stylizing for a clean-looking figure. .. rst-class:: sphx-glr-timing - **Total running time of the script:** ( 0 minutes 0.218 seconds) + **Total running time of the script:** ( 0 minutes 0.225 seconds) .. _sphx_glr_download_auto_examples_examples_plot_example_01.py: diff --git a/docs/auto_examples/examples/plot_example_01_codeobj.pickle b/docs/auto_examples/examples/plot_example_01_codeobj.pickle index 5a4a17b..e7c367b 100644 Binary files a/docs/auto_examples/examples/plot_example_01_codeobj.pickle and b/docs/auto_examples/examples/plot_example_01_codeobj.pickle differ diff --git a/docs/auto_examples/examples/plot_example_02.rst b/docs/auto_examples/examples/plot_example_02.rst index 2403bf3..04ce572 100644 --- a/docs/auto_examples/examples/plot_example_02.rst +++ b/docs/auto_examples/examples/plot_example_02.rst @@ -92,7 +92,7 @@ projected from MNI152 coordinates to fsLR surfaces using ``neuromaps``. .. rst-class:: sphx-glr-timing - **Total running time of the script:** ( 0 minutes 0.306 seconds) + **Total running time of the script:** ( 0 minutes 0.318 seconds) .. _sphx_glr_download_auto_examples_examples_plot_example_02.py: diff --git a/docs/auto_examples/examples/plot_example_02_codeobj.pickle b/docs/auto_examples/examples/plot_example_02_codeobj.pickle index f617e9a..ed413bf 100644 Binary files a/docs/auto_examples/examples/plot_example_02_codeobj.pickle and b/docs/auto_examples/examples/plot_example_02_codeobj.pickle differ diff --git a/docs/auto_examples/examples/sg_execution_times.rst b/docs/auto_examples/examples/sg_execution_times.rst index 5803696..b9c29ab 100644 --- a/docs/auto_examples/examples/sg_execution_times.rst +++ b/docs/auto_examples/examples/sg_execution_times.rst @@ -5,10 +5,10 @@ Computation times ================= -**00:00.524** total execution time for **auto_examples_examples** files: +**00:00.543** total execution time for **auto_examples_examples** files: +------------------------------------------------------------------------------------+-----------+--------+ -| :ref:`sphx_glr_auto_examples_examples_plot_example_02.py` (``plot_example_02.py``) | 00:00.306 | 0.0 MB | +| :ref:`sphx_glr_auto_examples_examples_plot_example_02.py` (``plot_example_02.py``) | 00:00.318 | 0.0 MB | +------------------------------------------------------------------------------------+-----------+--------+ -| :ref:`sphx_glr_auto_examples_examples_plot_example_01.py` (``plot_example_01.py``) | 00:00.218 | 0.0 MB | +| :ref:`sphx_glr_auto_examples_examples_plot_example_01.py` (``plot_example_01.py``) | 00:00.225 | 0.0 MB | +------------------------------------------------------------------------------------+-----------+--------+ diff --git a/docs/auto_examples/images/sphx_glr_plot_tutorial_01_001.png b/docs/auto_examples/images/sphx_glr_plot_tutorial_01_001.png index 6feabea..b30f745 100644 Binary files a/docs/auto_examples/images/sphx_glr_plot_tutorial_01_001.png and b/docs/auto_examples/images/sphx_glr_plot_tutorial_01_001.png differ diff --git a/docs/auto_examples/images/sphx_glr_plot_tutorial_02_002.png b/docs/auto_examples/images/sphx_glr_plot_tutorial_02_002.png index 356d9af..cd37c6f 100644 Binary files a/docs/auto_examples/images/sphx_glr_plot_tutorial_02_002.png and b/docs/auto_examples/images/sphx_glr_plot_tutorial_02_002.png differ diff --git a/docs/auto_examples/images/sphx_glr_plot_tutorial_05_004.png b/docs/auto_examples/images/sphx_glr_plot_tutorial_05_004.png new file mode 100644 index 0000000..2f2cbdd Binary files /dev/null and b/docs/auto_examples/images/sphx_glr_plot_tutorial_05_004.png differ diff --git a/docs/auto_examples/images/sphx_glr_plot_tutorial_06_003.png b/docs/auto_examples/images/sphx_glr_plot_tutorial_06_003.png index c53829f..e64b9a3 100644 Binary files a/docs/auto_examples/images/sphx_glr_plot_tutorial_06_003.png and b/docs/auto_examples/images/sphx_glr_plot_tutorial_06_003.png differ diff --git a/docs/auto_examples/images/thumb/sphx_glr_plot_tutorial_06_thumb.png b/docs/auto_examples/images/thumb/sphx_glr_plot_tutorial_06_thumb.png index 46187f0..0efaf95 100644 Binary files a/docs/auto_examples/images/thumb/sphx_glr_plot_tutorial_06_thumb.png and b/docs/auto_examples/images/thumb/sphx_glr_plot_tutorial_06_thumb.png differ diff --git a/docs/auto_examples/plot_tutorial_01.rst b/docs/auto_examples/plot_tutorial_01.rst index 609cd6b..d170bcd 100644 --- a/docs/auto_examples/plot_tutorial_01.rst +++ b/docs/auto_examples/plot_tutorial_01.rst @@ -202,7 +202,7 @@ by the minimum and maximum values (this can be adjusted with the .. rst-class:: sphx-glr-timing - **Total running time of the script:** ( 0 minutes 1.262 seconds) + **Total running time of the script:** ( 0 minutes 0.987 seconds) .. _sphx_glr_download_auto_examples_plot_tutorial_01.py: diff --git a/docs/auto_examples/plot_tutorial_01_codeobj.pickle b/docs/auto_examples/plot_tutorial_01_codeobj.pickle index 63685db..f24b74c 100644 Binary files a/docs/auto_examples/plot_tutorial_01_codeobj.pickle and b/docs/auto_examples/plot_tutorial_01_codeobj.pickle differ diff --git a/docs/auto_examples/plot_tutorial_02.rst b/docs/auto_examples/plot_tutorial_02.rst index 5d59c54..43db848 100644 --- a/docs/auto_examples/plot_tutorial_02.rst +++ b/docs/auto_examples/plot_tutorial_02.rst @@ -121,7 +121,7 @@ parameter, if desired. Values range from 0 (black) to 1 (white). For example: .. rst-class:: sphx-glr-timing - **Total running time of the script:** ( 0 minutes 0.598 seconds) + **Total running time of the script:** ( 0 minutes 0.584 seconds) .. _sphx_glr_download_auto_examples_plot_tutorial_02.py: diff --git a/docs/auto_examples/plot_tutorial_02_codeobj.pickle b/docs/auto_examples/plot_tutorial_02_codeobj.pickle index 5ff07ac..3896849 100644 Binary files a/docs/auto_examples/plot_tutorial_02_codeobj.pickle and b/docs/auto_examples/plot_tutorial_02_codeobj.pickle differ diff --git a/docs/auto_examples/plot_tutorial_03.rst b/docs/auto_examples/plot_tutorial_03.rst index 4acb535..2c6ec97 100644 --- a/docs/auto_examples/plot_tutorial_03.rst +++ b/docs/auto_examples/plot_tutorial_03.rst @@ -310,7 +310,7 @@ data match the number of vertices of the surface(s)! .. rst-class:: sphx-glr-timing - **Total running time of the script:** ( 0 minutes 0.920 seconds) + **Total running time of the script:** ( 0 minutes 0.941 seconds) .. _sphx_glr_download_auto_examples_plot_tutorial_03.py: diff --git a/docs/auto_examples/plot_tutorial_03_codeobj.pickle b/docs/auto_examples/plot_tutorial_03_codeobj.pickle index ed5c2ba..a82246d 100644 Binary files a/docs/auto_examples/plot_tutorial_03_codeobj.pickle and b/docs/auto_examples/plot_tutorial_03_codeobj.pickle differ diff --git a/docs/auto_examples/plot_tutorial_04.rst b/docs/auto_examples/plot_tutorial_04.rst index ca16bb7..46cdf26 100644 --- a/docs/auto_examples/plot_tutorial_04.rst +++ b/docs/auto_examples/plot_tutorial_04.rst @@ -266,7 +266,7 @@ For example: .. rst-class:: sphx-glr-timing - **Total running time of the script:** ( 0 minutes 0.971 seconds) + **Total running time of the script:** ( 0 minutes 0.961 seconds) .. _sphx_glr_download_auto_examples_plot_tutorial_04.py: diff --git a/docs/auto_examples/plot_tutorial_04_codeobj.pickle b/docs/auto_examples/plot_tutorial_04_codeobj.pickle index e090802..52996e1 100644 Binary files a/docs/auto_examples/plot_tutorial_04_codeobj.pickle and b/docs/auto_examples/plot_tutorial_04_codeobj.pickle differ diff --git a/docs/auto_examples/plot_tutorial_05.ipynb b/docs/auto_examples/plot_tutorial_05.ipynb index 0a14ab3..68556ad 100644 --- a/docs/auto_examples/plot_tutorial_05.ipynb +++ b/docs/auto_examples/plot_tutorial_05.ipynb @@ -87,14 +87,25 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Be sure to check out `sphx_glr_auto_examples_examples_plot_example_01.py`\nfor another example of colorbar styling.\n\n" + "Be sure to check out `sphx_glr_auto_examples_examples_plot_example_01.py`\nfor another example of colorbar styling.\n\n## Transparency\n\nThe transparency of the plotting layers can be adjusted by the ``alpha`` \nparameter. This may be preferred in cases with overlapping plotting layers.\nWe can recreate the example above with transparent maps like so:\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "p = Plot(lh, rh)\np.add_layer({'left': sulc_lh, 'right': sulc_rh}, cmap='binary_r', cbar=False)\np.add_layer(default, cmap='GnBu_r', cbar_label='Default mode', alpha=.5)\np.add_layer(fronto, cmap='YlOrBr_r', cbar_label='Frontoparietal', alpha=.5)\nfig = p.build(cbar_kws=kws)\nfig.show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "" + "Although these particular maps are largely non-overlapping, you can see some\nsmall overlap at the edges of the default mode and frontoparietal clusters \nthanks to the transparency.\n\n" ] } ], diff --git a/docs/auto_examples/plot_tutorial_05.py b/docs/auto_examples/plot_tutorial_05.py index 6189605..c5bb11a 100644 --- a/docs/auto_examples/plot_tutorial_05.py +++ b/docs/auto_examples/plot_tutorial_05.py @@ -92,8 +92,23 @@ ############################################################################### # Be sure to check out :ref:`sphx_glr_auto_examples_examples_plot_example_01.py` # for another example of colorbar styling. - +# +# Transparency +# ------------ +# +# The transparency of the plotting layers can be adjusted by the ``alpha`` +# parameter. This may be preferred in cases with overlapping plotting layers. +# We can recreate the example above with transparent maps like so: +p = Plot(lh, rh) +p.add_layer({'left': sulc_lh, 'right': sulc_rh}, cmap='binary_r', cbar=False) +p.add_layer(default, cmap='GnBu_r', cbar_label='Default mode', alpha=.5) +p.add_layer(fronto, cmap='YlOrBr_r', cbar_label='Frontoparietal', alpha=.5) +fig = p.build(cbar_kws=kws) +fig.show() ############################################################################### +# Although these particular maps are largely non-overlapping, you can see some +# small overlap at the edges of the default mode and frontoparietal clusters +# thanks to the transparency. # # .. _matplotlib colormap: https://matplotlib.org/stable/tutorials/colors/colormaps.html#sphx-glr-tutorials-colors-colormaps-py # .. _custom colormap: https://matplotlib.org/stable/tutorials/colors/colormap-manipulation.html diff --git a/docs/auto_examples/plot_tutorial_05.py.md5 b/docs/auto_examples/plot_tutorial_05.py.md5 index 5a9de5b..22a5085 100644 --- a/docs/auto_examples/plot_tutorial_05.py.md5 +++ b/docs/auto_examples/plot_tutorial_05.py.md5 @@ -1 +1 @@ -98eba5e7baf682b0d41b5693f10b0930 \ No newline at end of file +88c5f5b7de8ab61eb93c958b6aba4d79 \ No newline at end of file diff --git a/docs/auto_examples/plot_tutorial_05.rst b/docs/auto_examples/plot_tutorial_05.rst index d160b1e..06644ed 100644 --- a/docs/auto_examples/plot_tutorial_05.rst +++ b/docs/auto_examples/plot_tutorial_05.rst @@ -172,12 +172,45 @@ cleaner look: -.. GENERATED FROM PYTHON SOURCE LINES 93-95 +.. GENERATED FROM PYTHON SOURCE LINES 93-102 Be sure to check out :ref:`sphx_glr_auto_examples_examples_plot_example_01.py` for another example of colorbar styling. -.. GENERATED FROM PYTHON SOURCE LINES 97-101 +Transparency +------------ + +The transparency of the plotting layers can be adjusted by the ``alpha`` +parameter. This may be preferred in cases with overlapping plotting layers. +We can recreate the example above with transparent maps like so: + +.. GENERATED FROM PYTHON SOURCE LINES 102-108 + +.. code-block:: default + + p = Plot(lh, rh) + p.add_layer({'left': sulc_lh, 'right': sulc_rh}, cmap='binary_r', cbar=False) + p.add_layer(default, cmap='GnBu_r', cbar_label='Default mode', alpha=.5) + p.add_layer(fronto, cmap='YlOrBr_r', cbar_label='Frontoparietal', alpha=.5) + fig = p.build(cbar_kws=kws) + fig.show() + + + +.. image-sg:: /auto_examples/images/sphx_glr_plot_tutorial_05_004.png + :alt: Frontoparietal, Default mode + :srcset: /auto_examples/images/sphx_glr_plot_tutorial_05_004.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 109-117 + +Although these particular maps are largely non-overlapping, you can see some +small overlap at the edges of the default mode and frontoparietal clusters +thanks to the transparency. .. _matplotlib colormap: https://matplotlib.org/stable/tutorials/colors/colormaps.html#sphx-glr-tutorials-colors-colormaps-py .. _custom colormap: https://matplotlib.org/stable/tutorials/colors/colormap-manipulation.html @@ -188,7 +221,7 @@ for another example of colorbar styling. .. rst-class:: sphx-glr-timing - **Total running time of the script:** ( 0 minutes 0.573 seconds) + **Total running time of the script:** ( 0 minutes 0.783 seconds) .. _sphx_glr_download_auto_examples_plot_tutorial_05.py: diff --git a/docs/auto_examples/plot_tutorial_05_codeobj.pickle b/docs/auto_examples/plot_tutorial_05_codeobj.pickle index 88f5a35..78815d3 100644 Binary files a/docs/auto_examples/plot_tutorial_05_codeobj.pickle and b/docs/auto_examples/plot_tutorial_05_codeobj.pickle differ diff --git a/docs/auto_examples/plot_tutorial_06.rst b/docs/auto_examples/plot_tutorial_06.rst index 585a1bd..6228487 100644 --- a/docs/auto_examples/plot_tutorial_06.rst +++ b/docs/auto_examples/plot_tutorial_06.rst @@ -183,7 +183,7 @@ only need to show the left lateral view .. rst-class:: sphx-glr-timing - **Total running time of the script:** ( 0 minutes 0.524 seconds) + **Total running time of the script:** ( 0 minutes 0.506 seconds) .. _sphx_glr_download_auto_examples_plot_tutorial_06.py: diff --git a/docs/auto_examples/plot_tutorial_06_codeobj.pickle b/docs/auto_examples/plot_tutorial_06_codeobj.pickle index 5ef4fab..fd2a113 100644 Binary files a/docs/auto_examples/plot_tutorial_06_codeobj.pickle and b/docs/auto_examples/plot_tutorial_06_codeobj.pickle differ diff --git a/docs/auto_examples/sg_execution_times.rst b/docs/auto_examples/sg_execution_times.rst index b68deec..32d2167 100644 --- a/docs/auto_examples/sg_execution_times.rst +++ b/docs/auto_examples/sg_execution_times.rst @@ -5,18 +5,18 @@ Computation times ================= -**00:04.848** total execution time for **auto_examples** files: +**00:04.761** total execution time for **auto_examples** files: +-----------------------------------------------------------------------------+-----------+--------+ -| :ref:`sphx_glr_auto_examples_plot_tutorial_01.py` (``plot_tutorial_01.py``) | 00:01.262 | 0.0 MB | +| :ref:`sphx_glr_auto_examples_plot_tutorial_01.py` (``plot_tutorial_01.py``) | 00:00.987 | 0.0 MB | +-----------------------------------------------------------------------------+-----------+--------+ -| :ref:`sphx_glr_auto_examples_plot_tutorial_04.py` (``plot_tutorial_04.py``) | 00:00.971 | 0.0 MB | +| :ref:`sphx_glr_auto_examples_plot_tutorial_04.py` (``plot_tutorial_04.py``) | 00:00.961 | 0.0 MB | +-----------------------------------------------------------------------------+-----------+--------+ -| :ref:`sphx_glr_auto_examples_plot_tutorial_03.py` (``plot_tutorial_03.py``) | 00:00.920 | 0.0 MB | +| :ref:`sphx_glr_auto_examples_plot_tutorial_03.py` (``plot_tutorial_03.py``) | 00:00.941 | 0.0 MB | +-----------------------------------------------------------------------------+-----------+--------+ -| :ref:`sphx_glr_auto_examples_plot_tutorial_02.py` (``plot_tutorial_02.py``) | 00:00.598 | 0.0 MB | +| :ref:`sphx_glr_auto_examples_plot_tutorial_05.py` (``plot_tutorial_05.py``) | 00:00.783 | 0.0 MB | +-----------------------------------------------------------------------------+-----------+--------+ -| :ref:`sphx_glr_auto_examples_plot_tutorial_05.py` (``plot_tutorial_05.py``) | 00:00.573 | 0.0 MB | +| :ref:`sphx_glr_auto_examples_plot_tutorial_02.py` (``plot_tutorial_02.py``) | 00:00.584 | 0.0 MB | +-----------------------------------------------------------------------------+-----------+--------+ -| :ref:`sphx_glr_auto_examples_plot_tutorial_06.py` (``plot_tutorial_06.py``) | 00:00.524 | 0.0 MB | +| :ref:`sphx_glr_auto_examples_plot_tutorial_06.py` (``plot_tutorial_06.py``) | 00:00.506 | 0.0 MB | +-----------------------------------------------------------------------------+-----------+--------+ diff --git a/tutorials/plot_tutorial_05.py b/tutorials/plot_tutorial_05.py index 6189605..c5bb11a 100644 --- a/tutorials/plot_tutorial_05.py +++ b/tutorials/plot_tutorial_05.py @@ -92,8 +92,23 @@ ############################################################################### # Be sure to check out :ref:`sphx_glr_auto_examples_examples_plot_example_01.py` # for another example of colorbar styling. - +# +# Transparency +# ------------ +# +# The transparency of the plotting layers can be adjusted by the ``alpha`` +# parameter. This may be preferred in cases with overlapping plotting layers. +# We can recreate the example above with transparent maps like so: +p = Plot(lh, rh) +p.add_layer({'left': sulc_lh, 'right': sulc_rh}, cmap='binary_r', cbar=False) +p.add_layer(default, cmap='GnBu_r', cbar_label='Default mode', alpha=.5) +p.add_layer(fronto, cmap='YlOrBr_r', cbar_label='Frontoparietal', alpha=.5) +fig = p.build(cbar_kws=kws) +fig.show() ############################################################################### +# Although these particular maps are largely non-overlapping, you can see some +# small overlap at the edges of the default mode and frontoparietal clusters +# thanks to the transparency. # # .. _matplotlib colormap: https://matplotlib.org/stable/tutorials/colors/colormaps.html#sphx-glr-tutorials-colors-colormaps-py # .. _custom colormap: https://matplotlib.org/stable/tutorials/colors/colormap-manipulation.html