Note
Go to the end to download the full example code.
Create Connected Lines from Points#
Build a polyline from ordered points with pyvista.MultipleLines().
import numpy as np
import pyvista as pv
Create a winding polyline#
The points are connected in the order they are given.
Plot the line as a tube#
Tubing the polyline gives it visible thickness in 3D.
pl = pv.Plotter()
pl.add_mesh(line.tube(radius=0.08), scalars='height', cmap='viridis')
pl.show()

Total running time of the script: (0 minutes 6.842 seconds)