Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

MakeAnimation._start() public? #27571

Open
@doronbehar

Description

@doronbehar

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:

https://gitlab.com/doronbehar/lab-ion-trap-simulations/-/commit/2edc2abbe874ebd2af458f1d4f80710754d8625a

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!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp