add_points

Plotter.add_points(points, **kwargs)

Add points to a mesh.

Parameters
pointsnumpy.ndarray or pyvista.DataSet

Array of points or the points from a pyvista object.

**kwargsdict, optional

See pyvista.BasePlotter.add_mesh() for optional keyword arguments.

Returns
vtk.vtkActor

Actor of the mesh.

Examples

Add a numpy array of points to a mesh.

>>> import numpy as np
>>> import pyvista
>>> points = np.random.random((10, 3))
>>> pl = pyvista.Plotter()
>>> actor = pl.add_points(points, render_points_as_spheres=True, 
...                       point_size=100.0)
>>> pl.show()
../../../_images/pyvista-Plotter-add_points-1_00_00.png