The sequence of calls to Plotly.react laid out in this pen https://codepen.io/nicolaskruchten/pen/pLamVv?editors=1010 causes display problems in the last step. The buttons allow you to step through the sequence using a mix of newPlot and react to taste.