Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Description
Hello,
This is not exactly a bug report, nor a feature request, but rather more of a development dilemma that I'd like to discuss with you. I hope it's OK to discuss it here and not on discourse, as I feel here much more comfortable with code snippets and attachments, and I think that after a discussion this issue will be actionable as a feature request or a bug report.
I managed to create the following "poor man's GUI" to view results of many simulations in 1 figure:
matplotlib-_start-issue-demonstration.-.trimmed.-.without.issue.webm
Where the black vertical line in the lower right plot shows the progress of the simulation. This seems to behave great right? Apparently, I had to call an animation's_start()
function to achieve this. Here are details of the progress:
I used theData browser code as a starting point. Basically, whenself.update
is called (every time a simulation is picked), an animation is created usingself.anim = animation.FuncAnimation(...)
. The weird behavior I experienced before usingself.anim._start()
, is demonstrated in the following video:
matplotlib-_start-issue-demonstration.-.trimmed.-.with.issue.webm
As you can see, the animation never restarts it self, although theself.anim
object is assigned a new value every time a simulation is changed - the black time marker in the lower-right plot demonstrates this. Sometimes I experienced that pressingn orp (events handled by the class), in a certain timing, does make the simulation restart, but this is not well defined.
Here is the commit in my code that reproduces the issue I'm describing:
If you really want to reproduce the issue with my data, you will have to trust me with the pickle data I uploaded to this repository, to the branchmatplotlib-_start-issue-reproducing
.
Sorry for not creating a minimal working example 😬, but I hope you'd be able to discuss the issue although the code that reproduces it is involved in many irrelevant details.
Thanks for your attention!