.. 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_quickstart_retinotopy_webgl.py:
=====================================
Plot Example Retinotopy in Web Viewer
=====================================
This demo shows how to plot example retinotopy data onto a subject's brain
in a web viewer. In order for this demo to work, you need to download this
dataset_, but that can also be done automatically through the `urllib`
command that is included.
.. _dataset: http://gallantlab.org/pycortex/S1_retinotopy.hdf
S1 is the example subject that comes with pycortex, but if you want to plot
data onto a different subject, you will need to have them in your filestore.
This demo will not actually open the web viewer for you, but if you run it
yourself you will get a viewer showing something like the following.
.. image:: ../../webgl/angle_left.png
.. code-block:: default
import cortex
try: # python 2
from urllib import urlretrieve
except ImportError: # python 3
from urllib.request import urlretrieve
# Download and load in retinotopy data
_ = urlretrieve("http://gallantlab.org/pycortex/S1_retinotopy.hdf",
"S1_retinotopy.hdf")
ret_data = cortex.load("S1_retinotopy.hdf")
# Open the webviewer
cortex.webshow(ret_data)
.. rst-class:: sphx-glr-timing
**Total running time of the script:** ( 0 minutes 0.000 seconds)
.. _sphx_glr_download_auto_examples_quickstart_retinotopy_webgl.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: retinotopy_webgl.py `
.. container:: sphx-glr-download sphx-glr-download-jupyter
:download:`Download Jupyter notebook: retinotopy_webgl.ipynb `
.. only:: html
.. rst-class:: sphx-glr-signature
`Gallery generated by Sphinx-Gallery `_