Skip to main content

snaplot: Record and replay every step of your plotting process

snaplot logo

snaplot is a Python package here to help your record your plotting process, without having to think about it!

It's highly inspired by {camcorder}, an R package that does pretty much the same thing. If you're an R user, check it out!



Why?

By nature, data visualization is an iterative process: no one creates the final, perfectly polished version of a graph on the first try. It always takes plenty of trial and error.

Interestingly, visualizing this process can be quite insightful. That's where snaplot comes in.



How to use?

snaplot provides a single class (Camera) and is designed to be as easy-to-use as possible.

import matplotlib.pyplot as plt
from snaplot import Camera

camera = Camera.start("my_movie")

fig, ax = plt.subplots()
ax.plot([1, 2, 3], [1, 2, 3])                       # first chart
camera.snap()

fig, ax = plt.subplots()
ax.plot([1, 2, 3], [4, 2, 3], color="red")          # second chart
camera.snap()

fig, ax = plt.subplots()
ax.plot([1, 2, 3], [1, 5, 3], color="green", lw=3)  # third chart
camera.snap()

fig, ax = plt.subplots()
ax.plot([5, 2, 4], [2, 3, 3], color="blue", lw=6)   # fourth chart
camera.snap()

# GIF with 4 images, 300ms/image
camera.stop("my_file.gif", frame_duration=300)

In short:

  • you initiate a camera with camera = Camera.start()
  • you take snapshots with camera.snap()
  • you save your video with camera.stop()

For more info, check out the reference page



Installation

pip install snaplot



Some cool things

  • You can run Camera.start() multiple times with the same id without forgetting previous camera.snap(). Unless you set force_new=True, it will automatically recognize that you're still recording.
  • Even after calling camera.stop("file.gif"), you can keep recording. If you want to save the intermediate GIF, just use a different filename like camera.stop("file2.gif").
  • It works with any matplotlib-based plotting library: seaborn, plotnine, etc

Metadata

Release files for snaplot 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for snaplot 0.2.2
File Size Uploaded
snaplot-0.2.2.tar.gz 23.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for snaplot 0.2.2
File Interpreter ABI Platform
snaplot-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 23.8 MB

Release files / snaplot-0.2.2.tar.gz

Download URL snaplot-0.2.2.tar.gz
Size 23.8 MB
Tags Source
SHA-256 checksum
How to use checksums
178111e1f64696e13a02a9cdc8871de750b1e61fe4b94926a0eea23a5426ac0f
BLAKE2b-256 checksum
How to use checksums
e9aa5b4ee46864ee8069556e387cef14a35f5bdf3446f25a964b623521e41359
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2025.

Transparency log

Release files / snaplot-0.2.2-py3-none-any.whl

Download URL snaplot-0.2.2-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
92333afa1dff75b450c1a348d0e8a765f9276542243d7cd6785c89b56b8509cd
BLAKE2b-256 checksum
How to use checksums
bab904690f1e7d135e8b6bdaa5687ef73c8a32be26b185b22f02b3ff8ba96a6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page