In [1]:
import plotly.offline as py
from plotly.graph_objs import *
import numpy as np
from numpy import pi, cos, sin, exp, log, sqrt
py.init_notebook_mode()
In [2]:
def curve(rfun,tmin=-2,tmax=2,tpts=200,color='black'):
    domain = np.linspace(tmin,tmax,tpts)
    r = [[rfun(t)[i] for t in domain] for i in range(3)]
    trace = Scatter3d(x=r[0],y=r[1],z=r[2],mode='lines',
                      line=Line(color=color,width=3))
    return(trace)
In [3]:
traces=[curve(
            lambda t: (r*cos(w*t),r*sin(w*t),t),
            tmin=0,tmax=4*pi,color=c)
        for (r,w,c) in ((5,1,'red'),(3,3,'green'),(1,10,'blue'))]
py.iplot(Figure(data=Data(traces)))
In []: