I’d like to change the data of a figure in a sequence of functions. Means I have
fig = function0(data) which generates the initial figure object from initial data. The initial figure object is then passed to another
updated_fig = update_figure(fig).
I can get the current data traces of a figure with
data = fig['data'] (with
data=[trace0, trace1]). To append a new trace I could use
updated_data = data + (trace2, ). All traces are
Scattergl(). If I try to update the figure data with
fig['data'] = updated_data I get
ValueError: The data property of a figure may only be assigned a list or tuple that contains a permutation of a subset of itself.. What Am I doing wrong?