Black Lives Matter. Please consider donating to Black Girls Code today.

Plotting 3d line segments in Plotly

I am trying to plot a bunch of 3d line segments using Plotly in python. The only 2d way I have found till now is of using the Layout options in the 3dScatter function, as described here:

Are there any options available in 3d? Even in 2d, is there an easier way of plotting line segments. Like Matplotlib’s amazing LineCollection, which plots a bunch of lines in a flash.