DataObject.clear_field_data#
Examples#
Download Python source code | Download Jupyter notebook
Add field data to a PolyData dataset and then remove it.
>>> import pyvista as pv
>>> mesh = pv.Sphere()
>>> mesh.field_data['my-field-data'] = range(10)
>>> len(mesh.field_data)
1
>>> mesh.clear_field_data()
>>> len(mesh.field_data)
0