Plotly addTraces/relayout giving different output than newPlot
问题 I have a simple plot with two traces and two yaxis specs. When I plot them at the same time using newPlot I get the desired result. When I plot the traces (and layouts) one at a time, I get a different result, which is not what I want. With newPlot With addTraces / relayout https://jsfiddle.net/abalter/eatszatj/ Javascript: Plotly.newPlot("graph",[{}],{title: "Plot"}); trace1 = {y: [1,2,1]}; trace2 = { y: [0,0,0], yaxis: "y2", mode: "markers", marker: {symbol: 6, size: 12} }; yaxis1 = {domain