Skip to main content

Video Recording made easy - The tool you need for animations using Matplotlib, Plotly and other plotting libraries.

Project description

build status python 3.6 license apache

pyrecorder

You can find the detailed documentation here: https://www.egr.msu.edu/coinlab/blankjul/pyrecorder/

Installation

The framework is available at the PyPi Repository:

pip install -U pyrecorder

Usage

It’s as simple as it should be. Initialize a Video object with a Recorder and record the current plots by calling record(). Finally, close the video object with close() and you are good to go and watch your video.

import numpy as np
import matplotlib.pyplot as plt

from pyrecorder.recorders.file import File
from pyrecorder.video import Video

fname = "video.mp4"
vid = Video(File(fname))

for k in range(10):
    fig, (ax1, ax2) = plt.subplots(2)

    X = np.random.random((100, 2))
    ax1.scatter(X[:, 0], X[:, 1], color="green")

    X = np.random.random((100, 2))
    ax2.scatter(X[:, 0], X[:, 1], color="red")

    vid.record(fig=fig)

vid.close()

animation

Contact

Feel free to contact me if you have any question:

Julian Blank (blankjul [at] egr.msu.edu)
Michigan State University
Computational Optimization and Innovation Laboratory (COIN)
East Lansing, MI 48824, USA

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pyrecorder, version 0.1.8
Filename, size File type Python version Upload date Hashes
Filename, size pyrecorder-0.1.8.tar.gz (5.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page