.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/webgl/single_dataset.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_webgl_single_dataset.py: ======================== Create a 3D WebGL Viewer ======================== A webgl viewer displays a 3D view of brain data in a web browser .. GENERATED FROM PYTHON SOURCE LINES 9-23 .. code-block:: default import cortex import numpy as np np.random.seed(1234) # gather data Volume volume = cortex.Volume.random(subject='S1', xfmname='fullhead') # create viewer cortex.webgl.show(data=volume) # a port number will then be output, for example "Started server on port 39140" # the viewer can then be accessed in a web browser, in this case at "localhost:39140" .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.000 seconds) .. _sphx_glr_download_auto_examples_webgl_single_dataset.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: single_dataset.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: single_dataset.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_