Skip to main content

A tool to create animated graph visualizations, based on graphviz, based on legacy source code of gvanim - Massimo Santini

Project description

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 animategv.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 animategv 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 animategv 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

AnimateGraphViz-1.1.1-py3-none-any.whl (21.2 kB view details)

Uploaded Python 3

File details

Details for the file AnimateGraphViz-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: AnimateGraphViz-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 21.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.6

File hashes

Hashes for AnimateGraphViz-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c717858a1ec2ff7a0247dbe4b26633ed7822c1b5e175e53ccb09c333dd0b07d7
MD5 1b74667d18006909ad02b3618fc06c9f
BLAKE2b-256 e50d7f2e29893ebf66c8fd7367981870cff58a371ddd9196b52aa6577776545c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page