{"id":13412114,"url":"https://github.com/maxhumber/gif","last_synced_at":"2025-04-11T23:15:09.281Z","repository":{"id":38837322,"uuid":"237129001","full_name":"maxhumber/gif","owner":"maxhumber","description":"The matplotlib Animation Extension","archived":false,"fork":false,"pushed_at":"2023-08-02T13:18:25.000Z","size":59791,"stargazers_count":666,"open_issues_count":0,"forks_count":47,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-11T23:15:04.044Z","etag":null,"topics":["gif","gif-animation","matplotlib","pil","pillow","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maxhumber.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":"maxhumber","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-01-30T03:06:06.000Z","updated_at":"2025-04-09T23:39:45.000Z","dependencies_parsed_at":"2022-08-09T06:15:44.673Z","dependency_job_id":"c0d6e8b3-543e-4a44-ba1c-c7059592336d","html_url":"https://github.com/maxhumber/gif","commit_stats":{"total_commits":98,"total_committers":8,"mean_commits":12.25,"dds":0.3571428571428571,"last_synced_commit":"c34a3cf6d85de398a7d3a0a77379a8e6f2067ce9"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxhumber%2Fgif","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxhumber%2Fgif/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxhumber%2Fgif/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxhumber%2Fgif/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxhumber","download_url":"https://codeload.github.com/maxhumber/gif/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248492884,"owners_count":21113163,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gif","gif-animation","matplotlib","pil","pillow","python"],"created_at":"2024-07-30T20:01:21.144Z","updated_at":"2025-04-11T23:15:09.261Z","avatar_url":"https://github.com/maxhumber.png","language":"Python","funding_links":["https://github.com/sponsors/maxhumber"],"categories":["Python","Jupyter Notebook","Altair","Uncategorized"],"sub_categories":["Packages","Uncategorized"],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg alt=\"gif\" src=\"https://raw.githubusercontent.com/maxhumber/gif/master/images/logo.png\" height=\"200px\"\u003e\n\u003c/div\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://calver.org/\"\u003e\u003cimg src=\"https://img.shields.io/badge/calver-YY.MM.MICRO-22bfda.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://pypi.org/project/gif/\"\u003e\u003cimg src=\"https://img.shields.io/pypi/v/gif.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://pepy.tech/project/gif\"\u003e\u003cimg alt=\"Downloads\" src=\"https://pepy.tech/badge/gif/month\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n### About\n\nThe [matplotlib](https://matplotlib.org/) Animation Extension\n\n### Install \u0026 Import\n\n```sh\npip install gif\n```\n\n```python\nimport gif\n```\n\n### Quickstart\n\n```python\nimport gif\nfrom random import randint\nfrom matplotlib import pyplot as plt\n\nx = [randint(0, 100) for _ in range(100)]\ny = [randint(0, 100) for _ in range(100)]\n\n# (Optional) Set the dots per inch resolution to 300\ngif.options.matplotlib[\"dpi\"] = 300\n\n# Decorate a plot function with @gif.frame\n@gif.frame\ndef plot(i):\n    xi = x[i*10:(i+1)*10]\n    yi = y[i*10:(i+1)*10]\n    plt.scatter(xi, yi)\n    plt.xlim((0, 100))\n    plt.ylim((0, 100))\n\n# Construct \"frames\"\nframes = [plot(i) for i in range(10)]\n\n# Save \"frames\" to gif with a specified duration (milliseconds) between each frame\ngif.save(frames, 'example.gif', duration=50)\n```\n\n\n### Examples\n\n| [![arrival.gif](images/arrival.gif)](examples/arrival.py)    | [![hop.gif](images/hop.gif)](examples/hop.py)          | [![phone.gif](images/phone.gif)](examples/phone.py) |\n| ------------------------------------------------------------ | ------------------------------------------------------ | --------------------------------------------------- |\n| [![seinfeld.gif](images/seinfeld.gif)](examples/seinfeld.py) | [![spiral.gif](images/spiral.gif)](examples/spiral.py) | [![heart.gif](images/heart.gif)](heart.py)          |\n\n\n### Warning\n\nAltair and Plotly are no longer supported in `22.5.0`+\n\nPlease use `pip install gif==3.0.0` if you still need to interface with these libraries\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxhumber%2Fgif","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxhumber%2Fgif","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxhumber%2Fgif/lists"}