File tree Expand file tree Collapse file tree 1 file changed +18
-13
lines changed
examples/00-basic-pyvista-examples Expand file tree Collapse file tree 1 file changed +18
-13
lines changed Original file line number Diff line number Diff line change 3939from ansys .tools .visualization_interface import Plotter
4040from ansys .tools .visualization_interface .backends .pyvista import PyVistaBackend
4141
42- # Create a PyVista mesh
43- cube = pv .Cube ()
44-
45- pv_backend = PyVistaBackend (use_qt = True )
46-
47- # Create a plotter
48- pl = Plotter (backend = pv_backend )
49-
50- # Add the mesh to the plotter
51- pl .plot (cube )
42+ #########################
43+ # Open a pyvistaqt window
44+ # =======================
45+ # .. code-block:: python
46+ #
47+ # cube = pv.Cube()
48+ # pv_backend = PyVistaBackend(use_qt=True)
49+ # pl = Plotter(backend=pv_backend)
50+ # pl.plot(cube)
51+ # pl.show()
52+ #
5253
53- # Show the plotter
54- pl .show ()
5554
5655#####################
5756# Parallel VTK window
6362pl_parallel .plot (sphere )
6463pl_parallel .show ()
6564
66- pl ._backend ._pl .scene .close ()
65+ ############################
66+ # Close the pyvistaqt window
67+ # ==========================
68+ # .. code-block:: python
69+ #
70+ # pv_backend.close()
71+ #
You can’t perform that action at this time.
0 commit comments