.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/01-basic-plotly-examples/dash-usage.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. .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_01-basic-plotly-examples_dash-usage.py: .. _ref_plain_usage_dash: ====================================== Plain usage of the plotly dash backend ====================================== This example shows the plain usage of the Plotly Dash backend in the Visualization Interface Tool to plot different objects, including PyVista meshes, custom objects, and Plotly-specific objects. .. GENERATED FROM PYTHON SOURCE LINES 32-58 .. code-block:: Python from ansys.tools.visualization_interface.backends.plotly.plotly_dash import PlotlyDashBackend from ansys.tools.visualization_interface.types.mesh_object_plot import MeshObjectPlot from ansys.tools.visualization_interface import Plotter import pyvista as pv from plotly.graph_objects import Mesh3d # Create a plotter with the Plotly backend pl = Plotter(backend=PlotlyDashBackend()) # Create a PyVista mesh mesh = pv.Sphere() mesh2 = pv.Cube(center=(2,0,0)) # Plot the mesh pl.plot(mesh, name="Sphere") pl.plot(mesh2, name="Cube") # ---------------------------------- # Start the server and show the plot # ---------------------------------- # # .. code-block:: python # # pl.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.599 seconds) .. _sphx_glr_download_examples_01-basic-plotly-examples_dash-usage.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: dash-usage.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: dash-usage.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: dash-usage.zip `