pyvista.Plotter.update_scalars#

Plotter.update_scalars(scalars, mesh=None, render=True)[source]#

Update scalars of an object in the plotter.

Deprecated since version 0.43.0: This method is deprecated and will be removed in a future version of PyVista. It is functionally equivalent to directly modifying the scalars of a mesh in-place.

# Modify the points in place
mesh["my scalars"] = values
# Explicitly call render if needed
plotter.render()
Parameters:
scalarssequence

Scalars to replace existing scalars.

meshvtk.PolyData | vtk.UnstructuredGrid, optional

Object that has already been added to the Plotter. If None, uses last added mesh.

renderbool, default: True

Force a render when True.