# Animate a graphviz graph

I'm exploring some graph algorithms, and would like to animate the graph change over time (e.g. when adding a heap node or balancing a tree).

Is there a nice way to animate a sequence of graphviz graphs?

-
Yes and No. You will have to do something like this. Better use Ubigraph as @Anthony suggested. –  Pratik Deoghare Jun 22 '11 at 11:06
There have already been a number of questions about graph visualisation already asked, such as cstheory.stackexchange.com/q/2257/77, so why not look at them. –  Dave Clarke Jun 22 '11 at 11:25
A simple approach might be the following: First construct a graph that contains all nodes that existed at some point during the lifetime of the dynamic graph. Use graphviz (or any other tool) to find a nice layout of the graph. Then to animate it, it is sufficient to simply hide/reveal some parts of the graph (e.g., change colour attributes). With a little bit of hacking, it should be fairly easy to automate. –  Jukka Suomela Jun 23 '11 at 11:08
I'm voting to close as off-topic given this question asks about visualizing graphs made with particular software. This seems quite unrelated to TCS. –  Lev Reyzin Jun 23 '11 at 13:35
add comment

## 2 Answers

I'm not sure this question is on-topic here, and would suggest StackOverflow instead. For what it's worth, I never heard that what you are asking for is possible, but you might obtain better-looking results with Ubigraph (check out the demos, they are amazing).

-
This is a comment directed to the OP, should he chose this approach. The quality of the results depend upon how the graph changes. The examples suggested by the OP would produce excellent results. On the other hand, animating the graph of the changes in a research group's (or department's) collaboration network is less pretty – at least the way I did it. Changes to a graph at the leaves generally result in gradual changes to the animation. Adding or removing more deeply embedded edges often results in rather jerky animations. –  Dave Clarke Jun 22 '11 at 13:22
add comment

Not really, unfortunately. A few years ago it looked like a graph animation tool was going to be added to the Graphviz package, but it was removed because it never quite worked.

-
add comment