# Cannot update FigureWidget in Jupyter notebook in real time

**URL:** https://community.plotly.com/t/cannot-update-figurewidget-in-jupyter-notebook-in-real-time/29938
**Category:** 📊 Plotly Python
**Created:** [October 11, 2019, 11:12pm UTC](https://community.plotly.com/t/cannot-update-figurewidget-in-jupyter-notebook-in-real-time/29938 "2019-10-11T23:12:29Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![FlorinAndrei](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/florinandrei/32/10875_2.png) [@FlorinAndrei](https://community.plotly.com/u/FlorinAndrei)
#### Post date: [October 11, 2019, 11:12pm UTC](https://community.plotly.com/t/cannot-update-figurewidget-in-jupyter-notebook-in-real-time/29938/1 "2019-10-11T23:12:29Z")

</div>

Windows 10  
Python 3.7.4  
jupyter 1.0.0  
plotly 4.1.1

Trying to follow this example:

> **[Plotly FigureWidget Overview](https://plot.ly/python/figurewidget/#update-the-data-and-the-layout)**
>
> Introduction to the new Plotly FigureWidget

If I do this…

```auto
import plotly.graph_objects as go
f = go.FigureWidget()
f

```

…then what I get is this:

```auto
FigureWidget({
    'data': [], 'layout': {'template': '...'}
})

```

In order to actually display a figure, I need to do this instead:

```auto
import plotly.graph_objects as go
f = go.FigureWidget()
f.show()

```

An empty graph is then displayed. But then there’s no update later on.

I’ve tried some examples:

```auto
f.add_scatter(y=[2, 1, 4, 3]);
scatter = f.data[0]
scatter.y = [3, 1, 4, 3]

```

…but the figure is never updated, even when I use f.show()

What’s going on? What does it take to do live updates on a figure?

My ultimate goal is to draw a figure once, and then in a for loop to dynamically update the data that’s displayed.

---

<div class="post-metadata">

### Author: ![jvtech99](https://avatars.discourse-cdn.com/v4/letter/j/50afbb/32.png) [@jvtech99](https://community.plotly.com/u/jvtech99)
#### Post date: [February 14, 2021, 1:22am UTC](https://community.plotly.com/t/cannot-update-figurewidget-in-jupyter-notebook-in-real-time/29938/2 "2021-02-14T01:22:36Z")

</div>

Did you ever figure this out? Struggling with the same exact thing right now.

---

<div class="post-metadata">

### Author: ![FlorinAndrei](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/florinandrei/32/10875_2.png) [@FlorinAndrei](https://community.plotly.com/u/FlorinAndrei)
#### Post date: [February 14, 2021, 1:53am UTC](https://community.plotly.com/t/cannot-update-figurewidget-in-jupyter-notebook-in-real-time/29938/3 "2021-02-14T01:53:23Z")

</div>

I do not remember what the solution was - or whether I’ve found it, actually. What I needed Plotly for, ultimately, was to draw heat maps: plot the intensity of some variable based on geolocation coordinates. In that, I was successful. Check this repo:

> **[FlorinAndrei/c19](https://github.com/FlorinAndrei/c19)**
>
> COVID-19 animated maps, world and USA, showing the evolution in time

`world.py` and `usa.py` are the main apps. For multiprocessing, they launch multiple workers with code from `workers.py` - that’s where the Plotly code is. I have not looked at that code since I wrote it a while ago, so I don’t remember much off the top of my head.

Hope that helps.
