-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed
Labels
DocumentationGood first issueOpen a pull request against these issues if there are no active ones!Open a pull request against these issues if there are no active ones!topic: animation
Milestone
Description
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 use functools
to attach named parameters to the function update
, but it would be nice if FuncAnimation
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 the fargs
parameter, but we also add an fkwargs
for keyword parameters.
anntzer
Metadata
Metadata
Assignees
Labels
DocumentationGood first issueOpen a pull request against these issues if there are no active ones!Open a pull request against these issues if there are no active ones!topic: animation