Cannot update FigureWidget in Jupyter notebook in real time

Windows 10
Python 3.7.4
jupyter 1.0.0
plotly 4.1.1

Trying to follow this example:

If I do this…

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

…then what I get is this:

    'data': [], 'layout': {'template': '...'}

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

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

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

I’ve tried some examples:

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

…but the figure is never updated, even when I use

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.

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

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: and are the main apps. For multiprocessing, they launch multiple workers with code from - 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.