Black Lives Matter. Please consider donating to Black Girls Code today.
Dash HoloViews is now available! Check out the docs.

Updating the plot data and saving it

Hi there,

I am working on an app that can make edits to a plot. Right now, when the user chooses to update the plotly’s hover text, I am retracing the plot. When I leave the chart, the traces return back to the original state.

Is there a way I can save this plot with the new traces?

Thanks in advance.


This is something that may work.

for i in range(4): 
    trace= go.Scatter(

#input the new trace as 'trace'
updatemenus = list([dict(active=0, buttons=list([
                            dict(label = 'Edit Number '+str(k),
                                method = 'update',
                                args = [{'visible':[True if j==len(DataOut) else False for j in range(len(DataOut))]},
                                        {'title': ('Loan Satus Vs '+feat[k])}]

                         ) for k in range(n)]
#n is the number of plots in total. in this case n=5

layout.updatemenus= updatemenus

This should show you all the versions of the graph after each change as a dropdown.