# Bug when calling Plotly.update()

**URL:** https://community.plotly.com/t/bug-when-calling-plotly-update/23502
**Category:** plotly.js
**Created:** [May 15, 2019, 8:04pm UTC](https://community.plotly.com/t/bug-when-calling-plotly-update/23502 "2019-05-15T20:04:10Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![rgs](https://avatars.discourse-cdn.com/v4/letter/r/8c91f0/32.png) [@rgs](https://community.plotly.com/u/rgs)
#### Post date: [May 15, 2019, 8:04pm UTC](https://community.plotly.com/t/bug-when-calling-plotly-update/23502/1 "2019-05-15T20:04:10Z")

</div>

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.

 ![plotlybug_step1](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/d/d696444882e7784e909f5c8828654845f961d886.png) ![plotlybug_step2](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/3/33cc153f8be4b8602fe8b26690adf7405966b9e5.png) ![plotlybug_step3](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/9/94bc29045a41604356e0739d2badd35dcd921a55.png)
