Rotatable 3D plot in jupyter

PLotlyJS generates interactive plots:

using PlotlyJS

f(x,y) = 60 * cos(2 * atan(y/x) + 0.544331*sqrt(x^2+y^2)) / (20+sqrt(x^2+y^2))
x = LinRange(-45, 45, 200)
z = [f(u, v) for u in x, v in x]
waves = surface(
            z=z, 
            x=x,  
            y=x,  
            colorscale=colors.viridis,
            showscale=false)
Plot(waves, Layout(width=600, height=600, 
                   scene= attr(aspectmode="data",
                               camera_eye=attr(x=2.55, y=2.55, z=1.4)))
1 Like