Bug when calling Plotly.update()

It would appear I have encountered a bug in plotly.js. I have searched this forum but have not found anything relevant to help me out. The bug happens when I call Plotly.update() and it rescales my axis, and I can not set it back to the original after that.

I do this sequence of calls:

  1. Plotly.react("DetectionDiv’, data= [{}], az_el_layout); // create a plot with no data

  2. Plotly.addTraces(‘DetectionDiv’, trace); // works perfectly, data is displayed, graph looks as expected

  3. Plotly.update("DetectionDiv’, trace, {}, 0); // data is still displayed, but plot gets rescaled.

I have attached pictures at each step. Is there some attribute I need to set somewhere?

A subsequent call to Plotly.relayout(‘DetectionDiv’, az_el_layout); does not solve this either.