.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "tutorial/00_jupyter/jupyter.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code or to run this example in your browser via Binder .. rst-class:: sphx-glr-example-title .. _sphx_glr_tutorial_00_jupyter_jupyter.py: Test out PyVista's Jupyter Backend ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Become familiar with PyVista Jupyter backend. .. GENERATED FROM PYTHON SOURCE LINES 7-13 .. code-block:: Python import pyvista as pv # Set/enable the backed pv.set_jupyter_backend('trame') .. GENERATED FROM PYTHON SOURCE LINES 14-20 .. code-block:: Python pl = pv.Plotter() pl.add_mesh(pv.ParametricKlein()) pl.show() .. image-sg:: /tutorial/00_jupyter/images/sphx_glr_jupyter_001.png :alt: jupyter :srcset: /tutorial/00_jupyter/images/sphx_glr_jupyter_001.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 21-22 Client-side rendering only (in browser) .. GENERATED FROM PYTHON SOURCE LINES 22-28 .. code-block:: Python pl = pv.Plotter() pl.add_mesh(pv.ParametricRandomHills().elevation()) pl.show(jupyter_backend='client') .. image-sg:: /tutorial/00_jupyter/images/sphx_glr_jupyter_002.png :alt: jupyter :srcset: /tutorial/00_jupyter/images/sphx_glr_jupyter_002.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none /home/runner/.virtualenvs/.venv/lib/python3.10/site-packages/pyvista/plotting/plotter.py:6665: UserWarning: Not within a jupyter notebook environment. Ignoring ``jupyter_backend``. warnings.warn( .. GENERATED FROM PYTHON SOURCE LINES 29-30 Server-side rendering only .. GENERATED FROM PYTHON SOURCE LINES 30-35 .. code-block:: Python pl = pv.Plotter() pl.add_volume(pv.Wavelet()) pl.show(jupyter_backend='server') .. image-sg:: /tutorial/00_jupyter/images/sphx_glr_jupyter_003.png :alt: jupyter :srcset: /tutorial/00_jupyter/images/sphx_glr_jupyter_003.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none /home/runner/.virtualenvs/.venv/lib/python3.10/site-packages/pyvista/plotting/plotter.py:6665: UserWarning: Not within a jupyter notebook environment. Ignoring ``jupyter_backend``. warnings.warn( .. GENERATED FROM PYTHON SOURCE LINES 36-43 .. raw:: html
Open In Colab
.. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 1.804 seconds) .. _sphx_glr_download_tutorial_00_jupyter_jupyter.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: binder-badge .. image:: images/binder_badge_logo.svg :target: https://mybinder.org/v2/gh/pyvista/pyvista-tutorial/gh-pages?urlpath=lab/tree/notebooks/tutorial/00_jupyter/jupyter.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: jupyter.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: jupyter.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_