Line

Line(pointa=(- 0.5, 0.0, 0.0), pointb=(0.5, 0.0, 0.0), resolution=1)

Create a line.

Parameters
pointanp.ndarray or list, optional

Location in [x, y, z].

pointbnp.ndarray or list, optional

Location in [x, y, z].

resolutionint, optional

Number of pieces to divide line into.

Returns
pyvista.PolyData

Line mesh.

Examples

Create a line between (0, 0, 0) and (0, 0, 1).

>>> import pyvista
>>> mesh = pyvista.Line((0, 0, 0), (0, 0, 1))
>>> mesh.plot(color='k', line_width=10)
../../../_images/pyvista-Line-1_00_00.png