Skip to main content

GraphvizAnim

Build Status Binder DOI

GraphvizAnim is a tool to create simple animated graph visualizations; it is just a proof of concept, aimed mainly at teaching purposes. It is based on Graphviz for the graph rendering part and on ImageMagick for the animated gif generation. You can run the heap sort animation on-line using binder.

A graph animation is just a sequence of steps, a step is in turn one or more actions such as: add, hilight, label, unlabel or remove a node, and add, hilight, or remove an edge. Animations can be built by invoking suitable methods of a gvanim.Animation object (in a Python program), or by parsing a simple text file (that, in turn, can be generated by a program in any language).

The examples folder contains few instances of such approaches. After installing the package with python setup.py install, or using

pip install GraphvizAnim

you can generate an animated depth first visit (in a 3-regular random graph of 6 nodes) by running

python examples/dfv.py

or you can generate the simple animation described in simple.txt as

python -m gvanim examples/simple.txt simple

You can generate an Erdős–Rényi graph (with 10 nodes and edge probability 1/10) by running

cd examples
gcc -o er er.c
./er | python -m gvanim er

Finally, you can obain an interactive visualization of the heap sort algorithm using Jupyter by running

cd examples
jupyter notebook heapsort.ipynb

and running all the cells in order; or you can give a try to binder and watch the above animation actually running on-line.

Release files for GraphvizAnim 1.1.0

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

Built distribution (wheel)

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

Release files / GraphvizAnim-1.1.0-py3-none-any.whl

Download URL GraphvizAnim-1.1.0-py3-none-any.whl
Size 20.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5200ee68bd3f53d81ee6c157e43eb9d0862c229b539f6b8b212a20124083c183
BLAKE2b-256 checksum
How to use checksums
785b64134bd2e30fa39cab30f934b9c8e44e75cc7d2cb6949a0eed24a8f4af78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
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