plot2vid


Nameplot2vid JSON
Version 1.0.3 PyPI version JSON
download
home_page
SummaryThe easiest way to create animations using plots.
upload_time2023-08-05 10:55:00
maintainer
docs_urlNone
author
requires_python>=3.9
license/* * ---------------------------------------------------------------------------- * "THE BEER-WARE LICENSE" (Revision 42): * <szewczyk.franciszek02@gmail.com> wrote this package. As long as you retain this notice you * can do whatever you want with this stuff. If we meet some day, and you think * this stuff is worth it, you can buy me a beer in return. Franciszek Szewczyk * ---------------------------------------------------------------------------- */
keywords animation plot video
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # plot2vid

_The easiest way to create animations using plots._

This small Python package lets you store seperate matplotlib plots to create a video.

## Installation

```
pip install plot2vid
```

## Basic Usage

```python
from plot2vid import PlotRecorder
import matplotlib.pyplot as plt

# Setup
recorder = PlotRecorder("out.mp4")
fig = plt.figure()

for i in range(90):
    # Setting the plot limits
    plt.xlim(0,100)
    plt.ylim(0,100)

    # Plotting
    plt.scatter([i], [i])

    # Recording the frame
    recorder.add(fig)

    # Clearing the plot
    plt.clf()

# Storing the result
recorder.close()
```
The above code creates this video.

![ezgif-5-c21b239e33](https://github.com/fszewczyk/plot2vid/assets/60960225/5c7388aa-d955-46ff-b588-7bec7a4794b3)


## Advanced Usage

You can change the different settings of the recorder.

```python
recorder = plot2vid.PlotRecorder("out.mp4", fps=20)
```

## Roadmap

- [x] Support MP4
- [ ] Support AVI
- [x] Variable FPS

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "plot2vid",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "animation,plot,video",
    "author": "",
    "author_email": "Franciszek Szewczyk <szewczyk.franciszek02@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/69/15/a3d12c5cd37415fc21abd433d5389b92ea7fcd66a76b3ebbcfd5471fd7e9/plot2vid-1.0.3.tar.gz",
    "platform": null,
    "description": "# plot2vid\n\n_The easiest way to create animations using plots._\n\nThis small Python package lets you store seperate matplotlib plots to create a video.\n\n## Installation\n\n```\npip install plot2vid\n```\n\n## Basic Usage\n\n```python\nfrom plot2vid import PlotRecorder\nimport matplotlib.pyplot as plt\n\n# Setup\nrecorder = PlotRecorder(\"out.mp4\")\nfig = plt.figure()\n\nfor i in range(90):\n    # Setting the plot limits\n    plt.xlim(0,100)\n    plt.ylim(0,100)\n\n    # Plotting\n    plt.scatter([i], [i])\n\n    # Recording the frame\n    recorder.add(fig)\n\n    # Clearing the plot\n    plt.clf()\n\n# Storing the result\nrecorder.close()\n```\nThe above code creates this video.\n\n![ezgif-5-c21b239e33](https://github.com/fszewczyk/plot2vid/assets/60960225/5c7388aa-d955-46ff-b588-7bec7a4794b3)\n\n\n## Advanced Usage\n\nYou can change the different settings of the recorder.\n\n```python\nrecorder = plot2vid.PlotRecorder(\"out.mp4\", fps=20)\n```\n\n## Roadmap\n\n- [x] Support MP4\n- [ ] Support AVI\n- [x] Variable FPS\n",
    "bugtrack_url": null,
    "license": "/* * ---------------------------------------------------------------------------- * \"THE BEER-WARE LICENSE\" (Revision 42): * <szewczyk.franciszek02@gmail.com> wrote this package. As long as you retain this notice you * can do whatever you want with this stuff. If we meet some day, and you think * this stuff is worth it, you can buy me a beer in return. Franciszek Szewczyk * ---------------------------------------------------------------------------- */",
    "summary": "The easiest way to create animations using plots.",
    "version": "1.0.3",
    "project_urls": {
        "Homepage": "https://github.com/fszewczyk/plot2vid"
    },
    "split_keywords": [
        "animation",
        "plot",
        "video"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1fe9fecbc0f6d7f959c972f57daf1b30827aee521c7b918c8dfad2770f0623a6",
                "md5": "ca65b6ad49fd9502c000b3028b70c080",
                "sha256": "9bc26966f7f38da2201c130e55577f87f03d3ba4ff98142417b5899e5c3a0052"
            },
            "downloads": -1,
            "filename": "plot2vid-1.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ca65b6ad49fd9502c000b3028b70c080",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 2818,
            "upload_time": "2023-08-05T10:54:58",
            "upload_time_iso_8601": "2023-08-05T10:54:58.015407Z",
            "url": "https://files.pythonhosted.org/packages/1f/e9/fecbc0f6d7f959c972f57daf1b30827aee521c7b918c8dfad2770f0623a6/plot2vid-1.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6915a3d12c5cd37415fc21abd433d5389b92ea7fcd66a76b3ebbcfd5471fd7e9",
                "md5": "6e19575450f9b6938ceb9c25311299c0",
                "sha256": "22ad7bf807f8177d7dba0928f44e5ed3bef8f8e9e6883906e0fbb132d9abdacb"
            },
            "downloads": -1,
            "filename": "plot2vid-1.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "6e19575450f9b6938ceb9c25311299c0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 2058,
            "upload_time": "2023-08-05T10:55:00",
            "upload_time_iso_8601": "2023-08-05T10:55:00.082695Z",
            "url": "https://files.pythonhosted.org/packages/69/15/a3d12c5cd37415fc21abd433d5389b92ea7fcd66a76b3ebbcfd5471fd7e9/plot2vid-1.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-05 10:55:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "fszewczyk",
    "github_project": "plot2vid",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "plot2vid"
}
        
Elapsed time: 0.09297s