DPF Plot scoping on based on material number

ChrisC
ChrisC Member Posts: 11
First Comment
edited January 30 in Structures

I am trying to use DPF to plot custom results on a mesh. I need to specify the elements plotted by material number (specifically material number = 1). I've pulled together the following code from the help and examples. Specifically, I need to only display the selected elements. There is help on scoping, but can't figure out how to connect the scoping to the mesh_set.

model = dpf.Model("C:/example.rst")
mesh_set = model.metadata.meshed_region
plot = DpfPlotter()
plot.add_field(field_to_keep, meshed_region=mesh_set)
plot.show_figure(show_axes=True)