Skip to content

Commit a59802e

Browse files
PProfiziansys-akarcher
authored andcommitted
fix(doctest): fix doctests for plots of scopings (#2476)
1 parent a93480e commit a59802e

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

src/ansys/dpf/core/plotter.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ def add_streamlines(
678678
... radius=0.001,
679679
... )
680680
>>> pl.show_figure(show_axes=True)
681-
681+
(None, <pyvista.plotting.plotter.Plotter ...>)
682682
"""
683683
self._internal_plotter.add_streamlines(
684684
streamlines=streamlines,
@@ -788,17 +788,17 @@ def add_scoping(
788788
>>> node_scoping = dpf.Scoping(
789789
... location=dpf.locations.nodal,
790790
... ids=mesh.nodes.scoping.ids[0:100]
791-
...)
791+
... )
792792
>>> element_scoping = dpf.Scoping(
793793
... location=dpf.locations.elemental,
794794
... ids=mesh.elements.scoping.ids[0:100]
795-
...)
795+
... )
796796
>>> from ansys.dpf.core.plotter import DpfPlotter
797797
>>> plt = DpfPlotter()
798798
>>> plt.add_scoping(node_scoping, mesh, show_mesh=True, color="red")
799799
>>> plt.add_scoping(element_scoping, mesh, color="green")
800800
>>> plt.show_figure()
801-
801+
(None, <pyvista.plotting.plotter.Plotter ...>)
802802
"""
803803
self._internal_plotter.add_scoping(
804804
scoping=scoping, mesh=mesh, show_mesh=show_mesh, **kwargs
@@ -824,7 +824,7 @@ def show_figure(self, **kwargs):
824824
>>> pl = DpfPlotter()
825825
>>> pl.add_field(field, mesh)
826826
>>> pl.show_figure()
827-
827+
(None, <pyvista.plotting.plotter.Plotter ...>)
828828
"""
829829
if "notebook" in kwargs.keys():
830830
warnings.simplefilter("once")

src/ansys/dpf/core/scoping.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -518,14 +518,15 @@ def plot(self, mesh, show_mesh: bool = False, **kwargs):
518518
>>> node_scoping = dpf.Scoping(
519519
... location=dpf.locations.nodal,
520520
... ids=mesh.nodes.scoping.ids[0:100]
521-
...)
521+
... )
522522
>>> node_scoping.plot(mesh=mesh, color="red")
523+
(None, <pyvista.plotting.plotter.Plotter ...>)
523524
>>> element_scoping = dpf.Scoping(
524525
... location=dpf.locations.elemental,
525526
... ids=mesh.elements.scoping.ids[0:100]
526-
...)
527+
... )
527528
>>> element_scoping.plot(mesh=mesh, color="green")
528-
529+
(None, <pyvista.plotting.plotter.Plotter ...>)
529530
"""
530531
from ansys.dpf.core.plotter import DpfPlotter
531532

0 commit comments

Comments
 (0)