Here is a really pointless hack – Joern Hees asked me if I knew of any tools to force layout and visualise RDF graphs. We wondered about graphviz, but he wanted an interactive tool. When he left I wondered if it wouldn’t be quite easy to at least make an animation with graphviz. Of course it took longer than the 10 minutes, I expected, but it sort of worked. Based on the graphviz siblings example graph:
# get example wget http://www.graphviz.org/Gallery/directed/siblings.gv.txt # create the initial random layout neato -Gstart=rand -Gmaxiter=1 -o i.dot siblings.gv.txt # create 200 pngs for each iteration for x in $(seq 200) ; do neato -Gmaxiter=$x -Tpng -o $(printf "%03d" $x).png i.dot ; done # resize so they are all the same size - graphviz sizing (-Gsize=4,4) is specified in inches and does not always produce PNGs of the same size. for f in *.png ; do convert $f -resize 500x500! out.png ; mv out.png $f ; done # make movie mencoder mf://*.png -mf w=450:h=500:fps=10:type=png -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o output.avi # upload to youtube # profit!
(Of course there are many other tools that are much better than this – this is really a “because I can” case.)
Nice ;)
I’m currently giving gephi a hard time, seems very nice, come have a look ;)
Posted by Joern on February 17th, 2011.
Say, graphviz, can it do svg?
… Then you could steal the interaction of foafnaut for html5 :-P
Posted by Leo on February 21st, 2011.
It does – and you could. Some of the BTC visualisations I did were laid out with graphviz. These days I guess doing everything with HTML5 canvas would be better.
Posted by gromgull on February 22nd, 2011.
I’ve put together this https://github.com/mapio/GraphvizAnim it’s just a proof of concept, but it can come in handy…
Posted by Mapio on January 31st, 2016.