It looks like under the hood we use pyvista.Line and add a mesh:
pyvista.Line
So you could look into the relevant PyVista objects and see how they can be modified…