work in progress
Project description
gif
Installation
pip install gif
Usage
import random
from matplotlib import pyplot as plt
import gif
Decorate your plotting function with gif.frame
:
@gif.frame
def plot(x, y):
plt.figure(figsize=(5, 5))
plt.scatter(x, y)
plt.xlim((0, 100))
plt.ylim((0, 100))
Build a bunch of frames:
frames = []
for _ in range(50):
n = 10
x = [random.randint(0, 100) for _ in range(10)]
y = [random.randint(0, 100) for _ in range(10)]
frame = plot(x, y)
frames.append(frame)
Finally, save the gif:
gif.save(frames, 'yay.gif')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gif-0.1.tar.gz
(148.8 kB
view details)
File details
Details for the file gif-0.1.tar.gz
.
File metadata
- Download URL: gif-0.1.tar.gz
- Upload date:
- Size: 148.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
34d501d7d6a3a38eb6116f7c9a1e9c9cdc981cf7a6724f959a3ff65f91eb9ab6
|
|
MD5 |
41851410d122fa0796f5cc67bc5a2c03
|
|
BLAKE2b-256 |
d6b3d96618e2ff4411d201318d0946225f67a408852b178c4c777e9ce21b000c
|