pyvista.DataSet.active_scalars_name

pyvista.DataSet.active_scalars_name#

property DataSet.active_scalars_name: str | None[source]#

Return the name of the active scalars.

Returns:
str

Name of the active scalars.

Examples

Create a mesh, add scalars to the mesh, and return the name of the active scalars.

>>> import pyvista as pv
>>> mesh = pv.Sphere()
>>> mesh['Z Height'] = mesh.points[:, 2]
>>> mesh.active_scalars_name
'Z Height'