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

Properly add traces in 3d surface plot

So I have a 3d surface plot and I need to add some more surface to it, but addTraces is not working to my desire. lets say
var sIniData=[ { type: 'surface', hoverinfo : "x+y+z", colorscale: "Portland", hoverlabel : { bgcolor : "#2ca02c" }, z: [[1]], x: [[1]], y: [[1]]} ];
Now this
Plotly.addTraces(figurecontainer, sIniData);
Plotly.addTraces(figurecontainer, sIniData);
Plotly.addTraces(figurecontainer, sIniData);
results in 8 traces instead of 4, its like , number of traces increases 2 times with each addTraces. Also if I do just this
Plotly.addTraces(figurecontainer, {x:[..data..],y:[..data..],z:[..data..]});
this does not work. So how do I use addTraces in case of 3D surface/line plot

Hmm. I can’t replicate this issue. Here’s what my attempt: https://codepen.io/etpinard/pen/JwYXpv?editors=0010

Would you mind putting together a codepen to help us debug?

Satrt with Plotly.newPlot(gd,sIniData).
Well actually It seems after the new plot if I pass the sIniData as a JSON then its ok