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()
f
…then what I get is this:
FigureWidget({
'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()
f.show()
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 = 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.