2
$\begingroup$

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?

$\endgroup$
  • $\begingroup$ Yes and No. You will have to do something like this. Better use Ubigraph as @Anthony suggested. $\endgroup$ – Pratik Deoghare Jun 22 '11 at 11:06
  • 1
    $\begingroup$ 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. $\endgroup$ – Dave Clarke Jun 22 '11 at 11:25
  • $\begingroup$ 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. $\endgroup$ – Jukka Suomela Jun 23 '11 at 11:08
  • 1
    $\begingroup$ 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. $\endgroup$ – Lev Reyzin Jun 23 '11 at 13:35
1
$\begingroup$

By now, there are two:

  • GraphAnim, which takes a graph and then a list of changes to it for the animations as source, and converts it into an animated GIF
  • d3-graphviz, which takes a list of fully fledged graph descriptions as source, converts each into an SVG, and then uses JavaScript (Vue.js) and d3 to create animations between them. though it is possible to have other workflows, like interactively generating subsequent graphs in the fly.
| cite | improve this answer | |
$\endgroup$
6
$\begingroup$

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

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ 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. $\endgroup$ – Dave Clarke Jun 22 '11 at 13:22
0
$\begingroup$

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.

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.