I’m working on a research project (written in Python) which performs many consecutive graph transformations, mostly subgraph removals, until an optimum is achieved. I’d like to visualise this process with a Plotly/Dash app. My expectation would be to notify the app about every change immediately without any user interaction. I read that a usual solution for such situations used to be periodic interval-based updates. However, I need to capture every change/frame and my update intervals may vary from seconds to minutes, so the best solution would be to update the graph only when it’s needed.
Until now, I visualised the initial graph and created a framelist from all the changes during the optimization. From these information I could replay the transformations after the algorithm has finished, but I was not able to do this in real-time.
The closest example I found in Plotly docs is this, where the animation is updated after every compute() call:
However, I could not find the Python counterpart of this solution.
So my question in short: Is there a way to dynamically update a Plotly/Dash graph from Python without any user interaction?