Skip to content

Commit 441dacb

Browse files
committed
Improve docstring of Plotter.plot_contour
1 parent 1568717 commit 441dacb

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

src/ansys/dpf/core/plotter.py

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
from ansys.dpf.core.nodes import Node, Nodes
4848

4949
if TYPE_CHECKING: # pragma: no cover
50+
from ansys.dpf.core import Operator, Result
51+
from ansys.dpf.core.fields_container import FieldsContainer
5052
from ansys.dpf.core.meshed_region import MeshedRegion
5153

5254

@@ -831,31 +833,30 @@ def plot_chart(fields_container, off_screen=False, screenshot=None):
831833

832834
def plot_contour(
833835
self,
834-
field_or_fields_container,
835-
shell_layers=None,
836-
meshed_region=None,
837-
deform_by=None,
838-
scale_factor=1.0,
836+
field_or_fields_container: Union[Field, FieldsContainer],
837+
shell_layers: eshell_layers = None,
838+
meshed_region: MeshedRegion = None,
839+
deform_by: Union[Field, Result, Operator] = None,
840+
scale_factor: float = 1.0,
839841
**kwargs,
840842
):
841843
"""Plot the contour result on its mesh support.
842844
843845
You cannot plot a fields container containing results at several
844-
time steps.
846+
time steps. Use :func:`FieldsContainer.animate` instead.
845847
846848
Parameters
847849
----------
848-
field_or_fields_container : dpf.core.Field or dpf.core.FieldsContainer
850+
field_or_fields_container:
849851
Field or field container that contains the result to plot.
850-
shell_layers : core.shell_layers, optional
852+
shell_layers:
851853
Enum used to set the shell layers if the model to plot
852-
contains shell elements.
853-
deform_by : Field, Result, Operator, optional
854+
contains shell elements. Defaults to the top layer.
855+
deform_by:
854856
Used to deform the plotted mesh. Must output a 3D vector field.
855-
Defaults to None.
856-
scale_factor : float, optional
857-
Scaling factor to apply when warping the mesh. Defaults to 1.0.
858-
**kwargs : optional
857+
scale_factor:
858+
Scaling factor to apply when warping the mesh.
859+
**kwargs:
859860
Additional keyword arguments for the plotter. For more information,
860861
see ``help(pyvista.plot)``.
861862
"""

0 commit comments

Comments
 (0)