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

FuncAnimation Named Arguments #20326

Closed
Milestone
@Zeyuzhao

Description

@Zeyuzhao

Problem

I would like to use named arguments in FuncAnimation.

Currently:

ani = matplotlib.animation.FuncAnimation(  fig, update, frames=len(raw_history),  interval=500, repeat=True, repeat_delay=1,  fargs=(raw_history, action_history, style))

This would be slightly cumbersome when I change the order / type of arguments my function accepts. I could usefunctools to attach named parameters to the functionupdate, but it would be nice ifFuncAnimation can support this feature.

Proposed Solution

ani = matplotlib.animation.FuncAnimation(  fig, update, frames=len(raw_history),  interval=500, repeat=True, repeat_delay=1,  fkwargs={'raw_history': raw_history, 'action_history': action_history, 'style': style})

We keep thefargs parameter, but we also add anfkwargs for keyword parameters.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp