tweak vacuum-* output

Hi all, I am using vacuum-opengl and vacuum-ubigraph to visualise and analyse some of my data structures. They are quite helpful most of the time, however sometimes I feel the need to tweak the generated output -- such as removing the auto-generted identifiers from constrcutor names, pack some things together, or similar. Is there a way to configure their output? And for the vacuum-ubigraph option, I like it's output generally, however while creating the expression tree, is doesn't respect my structures. If there is a flag or so to fix this issue, I'd appreciate it. The Problem is like the following: data Expr = Sum Expr Expr | Mult Expr Expr | Single Int e = Sum (Single 2) (Mult (Single 3) (Single 4)) And it orients the tree in such a way that Mult looks like the root node, instead of Sum, as I would expect. Thanks, Ozgur Akgun

Ozgur Akgun wrote:
Hi all,
I am using vacuum-opengl and vacuum-ubigraph to visualise and analyse some of my data structures. They are quite helpful most of the time, however sometimes I feel the need to tweak the generated output -- such as removing the auto-generted identifiers from constrcutor names, pack some things together, or similar.
Is there a way to configure their output?
And for the vacuum-ubigraph option, I like it's output generally, however while creating the expression tree, is doesn't respect my structures. If there is a flag or so to fix this issue, I'd appreciate it. The Problem is like the following:
data Expr = Sum Expr Expr | Mult Expr Expr | Single Int e = Sum (Single 2) (Mult (Single 3) (Single 4))
And it orients the tree in such a way that Mult looks like the root node, instead of Sum, as I would expect.
Hi, I can answer only about vacuum-ubigraph. Regarding expression tree: the problem is Ubigraph doesn't know anything about the tree. It uses physical simulation to determine the optimum graph layout, the Mult node has the most links attached to it, that's why it's located at the center of the graph. As far as I can tell from Ubigraph docs, this cannot be tweaked. Theoretically one can change the shape of the graph visualization by introducing invisible links and/or nodes. And no, there's no way to tweak the vacuum-ubigraph output without modifying its code.
Thanks, Ozgur Akgun
------------------------------------------------------------------------
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Thanks for the answer.
I see your point, that Ubigraph does some magic* to place vertices and
edges.
This makes me wonder, how they generate the binary tree demo:
http://ubietylab.net/ubigraph/content/Demos/random_binary_tree.html
Is there a way to disable this optimal graph layout determination process?
Best,
Ozgur
* Nothing is magic.
On 12 May 2010 12:11, Gleb Alexeyev
Ozgur Akgun wrote:
Hi all,
I am using vacuum-opengl and vacuum-ubigraph to visualise and analyse some of my data structures. They are quite helpful most of the time, however sometimes I feel the need to tweak the generated output -- such as removing the auto-generted identifiers from constrcutor names, pack some things together, or similar.
Is there a way to configure their output?
And for the vacuum-ubigraph option, I like it's output generally, however while creating the expression tree, is doesn't respect my structures. If there is a flag or so to fix this issue, I'd appreciate it. The Problem is like the following:
data Expr = Sum Expr Expr | Mult Expr Expr | Single Int e = Sum (Single 2) (Mult (Single 3) (Single 4))
And it orients the tree in such a way that Mult looks like the root node, instead of Sum, as I would expect.
Hi, I can answer only about vacuum-ubigraph. Regarding expression tree: the problem is Ubigraph doesn't know anything about the tree. It uses physical simulation to determine the optimum graph layout, the Mult node has the most links attached to it, that's why it's located at the center of the graph. As far as I can tell from Ubigraph docs, this cannot be tweaked. Theoretically one can change the shape of the graph visualization by introducing invisible links and/or nodes.
And no, there's no way to tweak the vacuum-ubigraph output without modifying its code.
Thanks, Ozgur Akgun

Ozgur Akgun wrote:
Thanks for the answer.
I see your point, that Ubigraph does some magic* to place vertices and edges. This makes me wonder, how they generate the binary tree demo: http://ubietylab.net/ubigraph/content/Demos/random_binary_tree.html Is there a way to disable this optimal graph layout determination process?
Best, Ozgur
Ozgur, I've just compared the way vacuum-ubigraph visualizes binary trees to the random_binary_tree demo and found that I had missed an important edge attribute called "oriented", it seems to produce the output you want. I hope to upload the new package version soon, meanwhile you can do the following (assuming you use Linux): cabal unpack vacuum-ubigraph patch -d vacuum-ubigraph-0.1.0.3/ -p 1 < vacuum-ubigraph-oriented.patch cd vacuum-ubigraph-0.1.0.3 cabal configure && cabal build && cabal install

Thanks! It looks better now!
PS: I actually knew about the oriented attribute, but I thought this might
be something else. Anyway..
On 13 May 2010 09:23, Gleb Alexeyev
Ozgur Akgun wrote:
Thanks for the answer.
I see your point, that Ubigraph does some magic* to place vertices and edges. This makes me wonder, how they generate the binary tree demo: http://ubietylab.net/ubigraph/content/Demos/random_binary_tree.html Is there a way to disable this optimal graph layout determination process?
Best, Ozgur
Ozgur, I've just compared the way vacuum-ubigraph visualizes binary trees to the random_binary_tree demo and found that I had missed an important edge attribute called "oriented", it seems to produce the output you want.
I hope to upload the new package version soon, meanwhile you can do the following (assuming you use Linux):
cabal unpack vacuum-ubigraph patch -d vacuum-ubigraph-0.1.0.3/ -p 1 < vacuum-ubigraph-oriented.patch cd vacuum-ubigraph-0.1.0.3 cabal configure && cabal build && cabal install
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Ozgur Akgun

A little bit of topic, but why is the module Graphics.Ubigraph hidden in
your package? I've been trying to use Ubigraph directly, and your module
helped me a lot. (I just patched the cabal file to expose Graphics.Ubigraph
as well)
Is there a specific reason for it to be hidden?
As far as I know, there is another wrapper for Ubigraph in Haskell,
Hubigraph[1], but it's not on hackage. (licensing issues?) Your module
contains all the basics, and should be enough in general.
[1] http://ooxo.org/hubigraph/index.html
Best,
Ozgur
On 13 May 2010 10:32, Ozgur Akgun
Thanks! It looks better now!
PS: I actually knew about the oriented attribute, but I thought this might be something else. Anyway..
On 13 May 2010 09:23, Gleb Alexeyev
wrote: Ozgur Akgun wrote:
Thanks for the answer.
I see your point, that Ubigraph does some magic* to place vertices and edges. This makes me wonder, how they generate the binary tree demo: http://ubietylab.net/ubigraph/content/Demos/random_binary_tree.html Is there a way to disable this optimal graph layout determination process?
Best, Ozgur
Ozgur, I've just compared the way vacuum-ubigraph visualizes binary trees to the random_binary_tree demo and found that I had missed an important edge attribute called "oriented", it seems to produce the output you want.
I hope to upload the new package version soon, meanwhile you can do the following (assuming you use Linux):
cabal unpack vacuum-ubigraph patch -d vacuum-ubigraph-0.1.0.3/ -p 1 < vacuum-ubigraph-oriented.patch cd vacuum-ubigraph-0.1.0.3 cabal configure && cabal build && cabal install
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Ozgur Akgun
-- Ozgur Akgun

Ozgur Akgun wrote:
A little bit of topic, but why is the module Graphics.Ubigraph hidden in your package? I've been trying to use Ubigraph directly, and your module helped me a lot. (I just patched the cabal file to expose Graphics.Ubigraph as well)
Is there a specific reason for it to be hidden?
There's no reason whatsoever other than vacuum-ubigraph was born rather hastily and never maintained after that. Its complete history is in the vacuum-cairo announcement thread: http://www.mail-archive.com/haskell-cafe@haskell.org/msg57214.html As you can see, Don Stewart pointed me at Hubigraph, too. If it was on Hackage, probably the right thing to do would be to drop the hidden module and use Hubigraph.
As far as I know, there is another wrapper for Ubigraph in Haskell, Hubigraph[1], but it's not on hackage. (licensing issues?) Your module contains all the basics, and should be enough in general.
[1] http://ooxo.org/hubigraph/index.html
Best, Ozgur

In this case I think you should either make it a separate package, or don't
hide it in this module. It looks like an easy way to call Ubigraph from
Hhaskell, and there is no apparent alternative (in hackage) so why hide it?
On 13 May 2010 14:52, Gleb Alexeyev
Ozgur Akgun wrote:
A little bit of topic, but why is the module Graphics.Ubigraph hidden in your package? I've been trying to use Ubigraph directly, and your module helped me a lot. (I just patched the cabal file to expose Graphics.Ubigraph as well)
Is there a specific reason for it to be hidden?
There's no reason whatsoever other than vacuum-ubigraph was born rather hastily and never maintained after that. Its complete history is in the vacuum-cairo announcement thread:
http://www.mail-archive.com/haskell-cafe@haskell.org/msg57214.html
As you can see, Don Stewart pointed me at Hubigraph, too. If it was on Hackage, probably the right thing to do would be to drop the hidden module and use Hubigraph.
As far as I know, there is another wrapper for Ubigraph in Haskell, Hubigraph[1], but it's not on hackage. (licensing issues?) Your module contains all the basics, and should be enough in general.
[1] http://ooxo.org/hubigraph/index.html
Best, Ozgur
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Ozgur Akgun

Ozgur Akgun wrote:
In this case I think you should either make it a separate package, or don't hide it in this module. It looks like an easy way to call Ubigraph from Hhaskell, and there is no apparent alternative (in hackage) so why hide it?
I've contacted Kohei Ozaki, the author of Hubigraph, about the latter being uploaded to Hackage, and got the positive response. I'm updating vacuum-hubigraph package now, hope to upload the new version soon. Regards, Gleb.

The new version (0.2.0.1) is on Hackage. vacuum-ubigraph now depends on Hubigraph, basic customization is now possible, e.g.:
import System.Vacuum.Ubigraph import Graphics.Ubigraph
myNodeStyle n = map (setColor "#ff0000") $ defaultNodeStyle n where setColor color (VColor _) = VColor color setColor _ s = s
myview = customView (defaultOptions { nodeStyle = myNodeStyle }) defaultServer
main = myview $ cycle [1..5]
Any feedback appreciated.
participants (2)
-
Gleb Alexeyev
-
Ozgur Akgun