Q:

Tree visualisation and animation

I'm working with multiple search strategies on trees in Haskell. I want to visualize them and also animate the search I'm doing in it. The best I've found so far is graphviz images that I could generate by writing DOT files (like in Land of Lisp) but I doubt that it is the best approach. My trees can get quite big so I don't want to enter the position of each node in my program, I want them to be places correctly automatically.
I've also looked a little bit at Gephi but I'm not sure if I can input my data in it.
Also my Tree datatype is very basic : data Tree a = Leaf a | Branch (Tree a) (Tree a).
So in short, I'm looking for a way to get tree visualisation and animation on search strategy in it. I'm not looking necessarily for a Haskell centric solution but it could be great. Also being able to output the images/animation in standard format such as gif would a big plus.

A:

I'll expand my comment:
I haven't investigated pricing policy of Ubigraph, but you can download a free version from their site ("basic" one?). Then you can install vacuum-ubigraph package (there seems to be a build failure HackageDB under GHC 7.0, but I've just managed to install it under my 7.0.2 without a problem). Once it's done you can just start ubigraph_server and start 'feeding' it with your data structures right from ghci:
import System.Vacuum.Ubigraph

data Tree a = Leaf a | Branch (Tree a) (Tree a)
data Root a = Root a

tree =
    Root
    (Branch
     (Branch
      (Leaf "A")
      (Leaf "B"))
     (Leaf "C"))

Type view tree and you'll get something similar to:

You can zoom in/out and rotate it. Not sure how practical it is (it shows the entire Haskell object graph like it is - note shared []), but there are lots of settings to play with, so you can definitely make it look nicer. Animation seems to be supported as well.

