Title: FuncAnimation Named Arguments · Issue #20326 · matplotlib/matplotlib · GitHub
Open Graph Title: FuncAnimation Named Arguments · Issue #20326 · matplotlib/matplotlib
X Title: FuncAnimation Named Arguments · Issue #20326 · matplotlib/matplotlib
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...
Open Graph 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, f...
X 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, f...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/20326
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"FuncAnimation Named Arguments","articleBody":"### Problem\r\n\r\nI would like to use named arguments in FuncAnimation.\r\n\r\nCurrently:\r\n```\r\nani = matplotlib.animation.FuncAnimation(\r\n fig, update, frames=len(raw_history),\r\n interval=500, repeat=True, repeat_delay=1,\r\n fargs=(raw_history, action_history, style)\r\n)\r\n```\r\nThis 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.\r\n\r\n### Proposed Solution\r\n```\r\nani = matplotlib.animation.FuncAnimation(\r\n fig, update, frames=len(raw_history),\r\n interval=500, repeat=True, repeat_delay=1,\r\n fkwargs={'raw_history': raw_history, 'action_history': action_history, 'style': style}\r\n)\r\n```\r\nWe keep the `fargs` parameter, but we also add an `fkwargs` for keyword parameters.\r\n","author":{"url":"https://github.com/Zeyuzhao","@type":"Person","name":"Zeyuzhao"},"datePublished":"2021-05-28T22:21:52.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/20326/matplotlib/issues/20326"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:46b97d80-0654-54f2-dfe5-51f0910ab5af |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E5F0:FD134:193CE5C:23D358F:6A50C69D |
| html-safe-nonce | 60c3527d0efe76bea8d711620225d1a146e4140a44a572b245cc468d58073f8e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNUYwOkZEMTM0OjE5M0NFNUM6MjNEMzU4Rjo2QTUwQzY5RCIsInZpc2l0b3JfaWQiOiIzNTI0ODAzNTk3NzQwMDY2NDYxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 36df2cd66d044ca55ae499682cb766cf0c99bd55a1d171e6fa38b5d49ea24711 |
| hovercard-subject-tag | issue:906146126 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/20326/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1abb4f475a0ed16c2dff4352fbd00c1b51955c3ed6cfbb48f603870e9211733d/matplotlib/matplotlib/issues/20326 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1abb4f475a0ed16c2dff4352fbd00c1b51955c3ed6cfbb48f603870e9211733d/matplotlib/matplotlib/issues/20326 |
| og:image:alt | 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, f... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Zeyuzhao |
| hostname | github.com |
| expected-hostname | github.com |
| None | 72b13e0e8d0319acdd27a145cfe73f4f06c791713d0ac4690e41fb68ad28cac0 |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 08e79d53fc070870d5b168356afebb1e286a2ffe |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width