Draw line on surface

I’m looking to draw a line onto a surface. I already know how to draw the surface via the examles.
I tried to simply add a scatter3d (as the lines should be 3 dimensional) plot via addTraces, however I get the error: ‘all values must be integers’ (https://codepen.io/JonnyFapson/pen/jOOyRor).
The end result should look something like this: https://hackernoon.com/hn-images/1*f9a162GhpMbiTVTAua_lLQ.png.

Thank you in advance

Here’s a working version: https://codepen.io/etpinard/pen/MWWpwwo?editors=1010

You had {height: 540} as the third argument to Plotly.addTraces which optionally expects an array of numbers representing the index about which the new traces are added.

1 Like