A tool to create animated graph visualizations, based on graphviz
Project description
# GraphvizAnim
[![Build Status](https://travis-ci.org/mapio/GraphvizAnim.png?branch=master)](https://travis-ci.org/mapio/GraphvizAnim) [![Gitter](https://badges.gitter.im/mapio/GraphvizAnim.svg)](https://gitter.im/mapio/GraphvizAnim?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Binder](https://img.shields.io/badge/launch-binder-ff69b4.svg?style=flat)](http://mybinder.org/repo/mapio/GraphvizAnim/notebooks/examples/heapsort.ipynb)
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](http://www.graphviz.org/) for the graph rendering part and on [ImageMagick](http://www.imagemagick.org/) for the animated gif generation. You can [run the heap sort animation](http://mybinder.org/repo/mapio/GraphvizAnim/examples/heapsort.ipynb) on-line using [binder](http://mybinder.org/).
<p align=”center”> <img src=”examples/dfv.gif”/> <img src=”examples/heapsort.gif”/> </p>
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](examples) folder contains few instances of such approaches. After installing the package with python setup.py install, or using
pip install https://github.com/mapio/GraphvizAnim/archive/0.2-alpha.zip
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](examples/simple.txt) as
python -m gvanim examples/simple.txt simple
You can generate an [Erdős–Rényi](https://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93R%C3%A9nyi_model) 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](http://jupyter.org/) by running
cd examples jupyter notebook heapsort.ipynb
and running all the cells in order; or you can give a try to [binder](http://mybinder.org) and watch the above animation [actually running](http://mybinder.org/repo/mapio/GraphvizAnim/examples/heapsort.ipynb) on-line.
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
File details
Details for the file GraphvizAnim-0.3.1-alpha.tar.gz
.
File metadata
- Download URL: GraphvizAnim-0.3.1-alpha.tar.gz
- Upload date:
- Size: 17.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8fdc462722c9bf6b38a3186091eb4c877c28879f6b53d374d008fe752e62faf |
|
MD5 | ad5f41acdf4ae8a31ff26ae10b74a3e3 |
|
BLAKE2b-256 | 74347bcd0e69f5cedfa8d12e1c54a8c848abf03b64a300ba6d045de750b406b3 |