Skip to content

Commit c65c1fe

Browse files
committed
Add meshed_region parameter to field.plot()
1 parent 441dacb commit c65c1fe

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/ansys/dpf/core/field.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,9 @@ def to_nodal(self):
500500
op.inputs.connect(self)
501501
return op.outputs.field()
502502

503-
def plot(self, shell_layers=None, deform_by=None, scale_factor=1.0, **kwargs):
503+
def plot(
504+
self, shell_layers=None, deform_by=None, scale_factor=1.0, meshed_region=None, **kwargs
505+
):
504506
"""Plot the field or fields container on the mesh support if it exists.
505507
506508
Warning
@@ -536,7 +538,9 @@ def plot(self, shell_layers=None, deform_by=None, scale_factor=1.0, **kwargs):
536538
"""
537539
from ansys.dpf.core.plotter import Plotter
538540

539-
pl = Plotter(self.meshed_region, **kwargs)
541+
if meshed_region is None:
542+
meshed_region = self.meshed_region
543+
pl = Plotter(meshed_region, **kwargs)
540544
return pl.plot_contour(
541545
self,
542546
shell_layers,

0 commit comments

Comments
 (0)