Python/Plotly recompile button

时间:2017-07-10 15:17:34

标签: python random plotly

I'm not sure this is the correct place to ask this question, but I'm hoping someone here will have a useful or better idea.

I use python to randomly generate data, and then I use plotly to plot this data. Every time I compile the code, the output plot changes, as expected. If I make this html public, every user will always see the same plot, although based on random data. I would like to somehow include a button or some widget into the output html file of plotly that allows the user to `recompile'. That is, the user loads the webpage, sees a plot, clicks the 're-compile' button, and the page (possibly refreshes and) displays the new plot based on new random data.

Is such a thing possible? If a button isn't possible, is there a way of having the code re-run every time the page is launched? Or maybe there's a better way of achieving this?

Thanks

0 个答案:

没有答案