Subgraphs are used to try and force GraphViz to keep the children in the right order.

Without subgraphs, GraphViz tries as hard as it can to move nodes around resulting in a lower number of crossed lines.

In my experience, with a large number of nodes, subgraphs cause more harm than good.  But with smaller graphs, there are some people who like using subgraphs as it keeps the children in the right order.

Note there are options at the start of the .gv file which affect how hard GraphViz will work to try and find ways to uncross lines when it is laying out the graph.  Basically, you can tell GraphViz to work on it for weeks and it will try every permutation in the book to see if it can get things right.  The settings we use now are simply what I found worked reasonably well without it taking 24 hours to run and generate the graph, but there may be better options for you depending on your graph and what you're trying to achieive.

Stéphane


On Thu, Mar 11, 2010 at 00:34, Peter Hewett <gramps@hewett.co.nz> wrote:
On Wed, 10 Mar 2010 09:25:59 Benny Malengier wrote:
> Anyway, on  Reports -> Graph -> Relationsship Graph, select in file
> format: graphviz file, which defaults to the gv extension. This file
> is then a dot file which can be processed by graphviz.
>
> Eg, to make from the gv file a ps file, Gramps uses:
> dot -Tps:cairo -o"file.ps" "file.gv"
>
> for svg:
> dot -Tsvg -o"file.svg" "file.gv"
>
> etc ..

Now that's strange ...
After playing around with various graphviz viewers and editors (without finding
a way to manually alter ordering of elements to avoid lines crossing), I find
if I uncheck subgraphs in gramps, it now produces graphs as they should be.

That is, checking the subgraph item on the GraphViz options tab causes gramps
to produce output that is unnecessarily messy (ie lines cross when they don't
have to).

Hope this makes more sense to someone else than it does to me.


> It would be nice if you update the wiki page

I'd love to , but don't think I understand enough to attempt that just yet.

cheers


Peter



------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Gramps-users mailing list
Gramps-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gramps-users