add_point_scalar_labels

Plotter.add_point_scalar_labels(points, labels, fmt=None, preamble='', **kwargs)

Label the points from a dataset with the values of their scalars.

Wrapper for pyvista.BasePlotter.add_point_labels().

Parameters
pointsnumpy.ndarray or pyvista.DataSet

An n x 3 numpy.ndarray or pyvista dataset with points.

labelsstr, optional

String name of the point data array to use.

fmtstr, optional

String formatter used to format numerical data.

preamblestr, optional

Text before the start of each label.

**kwargsdict, optional

Keyword arguments passed to pyvista.BasePlotter.add_point_labels().

Returns
vtk.vtkActor2D

VTK label actor. Can be used to change properties of the labels.