Descendant tree drawing problem

For a geneaology project of my familiy, I generated this fairly straight forward drawing of my Grand-Grand-Grand-Grandfather’s descendants (click for full image):

Unfortunately, this representation does not give any information about when someone lived, or how long. I tried to add this information to the graph, and I coudn’t think of anything better than drawing each person as a rectangle whose upper edge lies above the parent’s rectangle, and whose height and vertical possition represent the life span. This is the result (here you really have to click for a full view):

This is obviouly not very helpful. Does anyone have a better idea how to draw this?

By the way, these graphs are generated using haskell and the cairo bindings provided by gtk2hs − very handy, as I also get svg output and pdf output for free.


Maybe is better to use specialised programs like: Gramps, Geneweb or Lifelines?
#1 bojce am 2007-11-23T15:44:55+00:00
Thanks for the hint. The data is actually stored in gramps, I just want to find a better way to draw the data and I don’t think that gramps provides such a graph.
#2 Joachim Breitner (Homepage) am 2007-11-23T16:05:09+00:00
write a file with directives for the dot tool (in the graphviz package) which can generate lots of image output formats.

You want to use
{ rank=same ...}
blocks to achieve your desired ordering.
#3 psp am 2007-11-23T16:53:39+00:00
Good idea, but I don’t think it fits entirely. From reading the docs I gather that using rank with dot will put a rectangle around the subgraph, but I want the subgraph to reach out of the parent rectangle (at least if the child lived longer than the parent).
#4 Joachim Breitner (Homepage) am 2007-11-23T22:10:58+00:00
How about this (the group attributes cause nice vertical lines for 'life lines'. Descendant lines are not straight, but that is inherent to dot-generated graphs)

digraph ft {
node [shape=plaintext, fontsize=16]
1880 -> 1890 -> 1900 -> 1910 -> 1920 -> 1930 -> 1940 ->
1950 -> 1960 -> 1970 -> 1980 -> 1990 -> 2000 -> 2010

GFF_b [group=GFF];
GMF_b [group=GMF];
GFM_b [group=GFM];
GMM_b [group=GMM];
MO_b [group=MO];
FA_b [group=FA];
CH1_b [group=CH1];
CH2_b [group=CH2];
CH3_b [group=CH3];
node [style=invis]
GFF_d [group=GFF];
GMF_d [group=GMF];
GFM_d [group=GFM];
GMM_d [group=GMM];
MO_d [group=MO];
FA_d [group=FA];
CH1_d [group=CH1];
CH2_d [group=CH2];
CH3_d [group=CH3];

/* timeline */
{ rank = same; 1880; GFF_b; }
{ rank = same; 1890; GMF_b; GFM_b }
{ rank = same; 1900; GMM_b; }
{ rank = same; 1930; FA_b; }
{ rank = same; 1940; MO_b; }
{ rank = same; 1960; GFF_d; CH1_b; CH2_b }
{ rank = same; 1970; GMF_d; CH3_b }
{ rank = same; 1980; GFM_d; }
{ rank = same; 1990; GMM_d; }
{ rank = same; 2010; FA_d; MO_d; CH1_d; CH2_d; CH3_d}

/* lifelines */
GFF_b -> GFF_d [dir=none,style="setlinewidth(9)"];
GMF_b -> GMF_d [dir=none,style="setlinewidth(9)"];
GFM_b -> GFM_d [dir=none,style="setlinewidth(9)"];
GMM_b -> GMM_d [dir=none,style="setlinewidth(9)"];
FA_b -> FA_d [dir=none,style="setlinewidth(9)"];
MO_b -> MO_d [dir=none,style="setlinewidth(9)"];
CH1_b -> CH1_d [dir=none,style="setlinewidth(9)"];
CH2_b -> CH2_d [dir=none,style="setlinewidth(9)"];
CH3_b -> CH3_d [dir=none,style="setlinewidth(9)"];

/* descendant lines */
GFF_b -> FA_b;
GMF_b -> FA_b;
GFM_b -> MO_b;
GMM_b -> MO_b;
FA_b -> CH1_b;
FA_b -> CH2_b;
FA_b -> CH3_b;
MO_b -> CH1_b;
MO_b -> CH2_b;
MO_b -> CH3_b;
#5 psp am 2007-11-25T21:54:51+00:00
Your example looks good, but I just wrote a wrapper that my data in that format, and this is too much for dot, it seems:

identify /tmp/dotgraph.png /tmp/dotgraph.png PNG 74698x2061 74698x2061+0+0 DirectClass 1.9mb 15.540u 0:17

Obviously I can’t open that file. If I make dot write a pdf file, I can actually read that file, but it’s just too large. I doubt that I can get around writing my own implementations − which is not a problem, I just need a better idea :-)
#6 Joachim Breitner (Homepage) am 2007-11-25T23:02:12+00:00
apt-get install gramps
#7 Jeff Schroeder (Homepage) am 2007-11-23T20:29:38+00:00
See above; I’m already using gramps, but I’d like to generate my own visual representations.
#8 Joachim Breitner (Homepage) am 2007-11-23T22:04:23+00:00

I'm interested in my families geneaology and have to make some reports in the near future for my family.

I think you might have more luck if you just turn the entire graph 90 degrees. counter clockwise. Then you could put the time line across the top.

Good luck and let us know how it goes
#9 scott am 2007-11-24T01:48:14+00:00
Good idea, although it does not solve the problem of the wide (then high) graph.
#10 Joachim Breitner (Homepage) am 2007-11-24T10:48:06+00:00
A Gantt-chart could probably do the trick.
#11 David Weinehall am 2007-11-24T09:14:52+00:00
The difference would be that the relationship is not displayed by inclusion of the squares, but by a thin horizontal line (or vertical line, if time goes to the right), right?
#12 Joachim Breitner (Homepage) am 2007-11-24T10:50:55+00:00
Ok, I tried it. It is a bit tighter, but didn’t make a big difference. Thanks for the idea, though!
#13 Joachim Breitner (Homepage) am 2007-11-25T23:03:01+00:00

Have something to say? You can post a comment by sending an e-Mail to me at <mail@joachim-breitner.de>, and I will include it here.