For your first question (what is the difference between using fig.batch_update and updating directly the trace data), here it does not make much of a difference because you only have one method call to update the FigureWidget. Using fig.batch_update is interesting when you have several update calls, because then they are batched together in a single patch sent only once to update the figure. See the docstring of fig.batch_update and its examples https://plot.ly/python-api-reference/generated/plotly.graph_objects.Figure.html#plotly.graph_objects.Figure.batch_update for more details.