Skip to content

Commit

Permalink
added transparency example + docs build
Browse files Browse the repository at this point in the history
  • Loading branch information
danjgale committed Dec 20, 2022
1 parent b2dacf8 commit 804f162
Show file tree
Hide file tree
Showing 27 changed files with 99 additions and 25 deletions.
2 changes: 1 addition & 1 deletion docs/auto_examples/examples/plot_example_01.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Binary file modified docs/auto_examples/examples/plot_example_01_codeobj.pickle
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/auto_examples/examples/plot_example_02.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Binary file modified docs/auto_examples/examples/plot_example_02_codeobj.pickle
Binary file not shown.
6 changes: 3 additions & 3 deletions docs/auto_examples/examples/sg_execution_times.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
+------------------------------------------------------------------------------------+-----------+--------+
Binary file modified docs/auto_examples/images/sphx_glr_plot_tutorial_01_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/auto_examples/images/sphx_glr_plot_tutorial_02_002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/auto_examples/images/sphx_glr_plot_tutorial_06_003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/auto_examples/plot_tutorial_01.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Binary file modified docs/auto_examples/plot_tutorial_01_codeobj.pickle
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/auto_examples/plot_tutorial_02.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Binary file modified docs/auto_examples/plot_tutorial_02_codeobj.pickle
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/auto_examples/plot_tutorial_03.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Binary file modified docs/auto_examples/plot_tutorial_03_codeobj.pickle
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/auto_examples/plot_tutorial_04.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Binary file modified docs/auto_examples/plot_tutorial_04_codeobj.pickle
Binary file not shown.
15 changes: 13 additions & 2 deletions docs/auto_examples/plot_tutorial_05.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}
],
Expand Down
17 changes: 16 additions & 1 deletion docs/auto_examples/plot_tutorial_05.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/auto_examples/plot_tutorial_05.py.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
98eba5e7baf682b0d41b5693f10b0930
88c5f5b7de8ab61eb93c958b6aba4d79
39 changes: 36 additions & 3 deletions docs/auto_examples/plot_tutorial_05.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
Binary file modified docs/auto_examples/plot_tutorial_05_codeobj.pickle
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/auto_examples/plot_tutorial_06.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Binary file modified docs/auto_examples/plot_tutorial_06_codeobj.pickle
Binary file not shown.
14 changes: 7 additions & 7 deletions docs/auto_examples/sg_execution_times.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
+-----------------------------------------------------------------------------+-----------+--------+
17 changes: 16 additions & 1 deletion tutorials/plot_tutorial_05.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 804f162

Please sign in to comment.