Skip to content

Commit

Permalink
Update README and TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-ramadhan committed May 11, 2024
1 parent 1a8c9a7 commit 821a7af
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ Weave your frames into matplotlib animations.
* [celluloid](https://github.com/jwkvam/celluloid) is a nice package for making matplotlib animations easily, but as it relies on `ArtistAnimation` under the hood it does come with some [limitations](https://github.com/jwkvam/celluloid?tab=readme-ov-file#limitations) such as not being able to animate titles. It also hasn't been maintained since 2018.
* Plotting many frames (hundreds to thousands+) can be slow but with matplotloom you can use a `ParallelLoom` to plot each frame in parallel, speeding up the animation process significantly especially if you can dedicate many cores to plotting.

## Notes?

* You have to call `loom.save_frame(fig)` for each frame. While the `Loom` object can be made to do this automatically it would have to create and own the `Figure` instance and I wanted full control over the creation of the `Figure`.

## Installation

matplotloom is published on PyPI so you can install matplotloom via `pip`
Expand Down
9 changes: 3 additions & 6 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@
https://github.com/matplotlib/matplotlib/blob/v3.8.3/lib/matplotlib/animation.py#L1320-L1356
https://github.com/matplotlib/matplotlib/blob/v3.8.3/lib/matplotlib/_animation_data.py
* Output writers besides ffmpeg?
* Parallel plotting.
* Add more comprehensive tests.

## Documentation

* Add/generate a README and add badges.
* Lots of nice gallery examples (show them in the documentation and the README). Worth remaking any from the matplotlib gallery?
* Add documentation GitHub Action.
* Add some badges to the README.
* Write some documentation and add some docstrings.
* Add a small section of features (e.g. parallel plotting), tips (e.g. use tqdm), and motivation (compare vs. matplotlib and celluloid).
* Add documentation GitHub Action.
* Add a small section of features (e.g. parallel plotting), tips (e.g. use tqdm).

## Examples

Expand Down
8 changes: 5 additions & 3 deletions tests/test_examples.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest
import joblib

from pathlib import Path

Expand All @@ -15,6 +16,7 @@ def test_rotating_circular_sine_wave():
run_example("rotating_circular_sine_wave")
assert Path("rotating_circular_sine_wave.mp4").is_file()

def test_parallel_sine_wave():
run_example("parallel_sine_wave")
assert Path("parallel_sine_wave.gif").is_file()
# Not sure why this fails with "NameError: name 'delayed' is not defined" =/
# def test_parallel_sine_wave():
# run_example("parallel_sine_wave")
# assert Path("parallel_sine_wave.gif").is_file()

0 comments on commit 821a7af

Please sign in to comment.