Function Repository Resource:

GenealogyTreePlot

Source Notebook

Generate a genealogy family tree showing the relationship between you and another relative

Contributed by: Jeff Bryant

ResourceFunction["GenealogyTreePlot"][relationship]

generates a tree showing how the specified relationship relates to you.

Details and Options

ResourceFunction["GenealogyTreePlot"] returns a Graphics expression.
Base relationships must be one of: "Cousin", "Father", "Pop", "Mother", "Parent", "Husband", "Wife", "Spouse", "Brother", "Sister", "Sibling", "Son", "Daughter", "Child", "Kid", "Uncle", "Aunt", "Nephew", "Niece", "Grandson", "Granddaughter", "Grandchild", "Grandfather", "Grandmother", "Grandparent", "Grandnephew", "Grandniece", "Granduncle", "Grandaunt".
Some relationships include support for "Great" or "Grand" as qualifiers, e.g. your great uncle would be {"Uncle", "Great" 1}. The relationships supporting these qualifiers include "Uncle", "Aunt", "Nephew", "Niece", "Grandson", "Granddaughter", "Grandchild", "Grandfather", "Grandmother", "Grandparent", "Grandnephew", "Grandniece", "Granduncle", "Grandaunt".
"Cousin" supports both "Ordinal" and "Removed" as qualifiers. For example, your first cousin twice removed would be represented as {"Cousin", "Ordinal"1, "Removed"2}.
Lists of relationships represent the composition of such relationships. For example, your mother's cousin would be represented as {"Mother", "Cousin"}.
The default colors can be overriden using the "NodeColors" option, which should be a list of two colors.

Examples

Basic Examples (19) 

Show the relationship between you and your mother:

In[1]:=
ResourceFunction["GenealogyTreePlot"]["Mother"]
Out[1]=

Show the relationship between you and your father:

In[2]:=
ResourceFunction["GenealogyTreePlot"]["Father"]
Out[2]=

Show the relationship between you and a gender-neutral sibling:

In[3]:=
ResourceFunction["GenealogyTreePlot"]["Sibling"]
Out[3]=

Show the relationship between you and your brother:

In[4]:=
ResourceFunction["GenealogyTreePlot"]["Brother"]
Out[4]=

Show the relationship between you and your sister:

In[5]:=
ResourceFunction["GenealogyTreePlot"]["Sister"]
Out[5]=

Show the relationship between you and your grandmother:

In[6]:=
ResourceFunction["GenealogyTreePlot"]["Grandmother"]
Out[6]=

Show the relationship between you and your grandfather:

In[7]:=
ResourceFunction["GenealogyTreePlot"]["Grandfather"]
Out[7]=

Show the relationship between you and your great grandfather:

In[8]:=
ResourceFunction["GenealogyTreePlot"][{"Grandfather", "Great" -> 1}]
Out[8]=

Show the relationship between you and your fourth great grandfather:

In[9]:=
ResourceFunction["GenealogyTreePlot"][{"Grandfather", "Great" -> 4}]
Out[9]=

Show the relationship between you and your grandfather's grandfather:

In[10]:=
ResourceFunction["GenealogyTreePlot"][{"Grandfather", "Grandfather"}]
Out[10]=

Show the relationship between you and your cousin:

In[11]:=
ResourceFunction["GenealogyTreePlot"]["Cousin"]
Out[11]=

Show the relationship between you and your first cousin:

In[12]:=
ResourceFunction["GenealogyTreePlot"][{"Cousin", "Ordinal" -> 1}]
Out[12]=

Show the relationship between you and your first cousin once removed:

In[13]:=
ResourceFunction[
 "GenealogyTreePlot"][{"Cousin", "Ordinal" -> 1, "Removed" -> 1}]
Out[13]=

Show the relationship between you and your aunt:

In[14]:=
ResourceFunction["GenealogyTreePlot"]["Aunt"]
Out[14]=

Show the relationship between you and your great uncle:

In[15]:=
ResourceFunction["GenealogyTreePlot"][{"Uncle", "Great" -> 1}]
Out[15]=

Show the relationship between you and your great great aunt:

In[16]:=
ResourceFunction["GenealogyTreePlot"][{"Aunt", "Great" -> 2}]
Out[16]=

Show the relationship between you and your nephew:

In[17]:=
ResourceFunction["GenealogyTreePlot"]["Nephew"]
Out[17]=

Show the relationship between you and your grand nephew:

In[18]:=
ResourceFunction["GenealogyTreePlot"][{"Nephew", "Grand" -> 1}]
Out[18]=

Show the relationship between you and your mother's grandfather:

In[19]:=
ResourceFunction["GenealogyTreePlot"][{"Mother", "Grandfather"}]
Out[19]=

Scope (3) 

Show the relationship between you and your first cousin three times removed:

In[20]:=
ResourceFunction[
 "GenealogyTreePlot"][{"Cousin", "Ordinal" -> 1, "Removed" -> 3}]
Out[20]=

Show the relationship between you and your mother's mother's mother:

In[21]:=
ResourceFunction["GenealogyTreePlot"][{"Mother", "Mother", "Mother"}]
Out[21]=

Show the relationship between you and your mother's second cousin once removed:

In[22]:=
ResourceFunction[
 "GenealogyTreePlot"][{"Mother", {"Cousin", "Ordinal" -> 2, "Removed" -> 1}}]
Out[22]=

Options (1) 

Default colors for the nodes can be overridden:

In[23]:=
ResourceFunction["GenealogyTreePlot"]["Cousin", "NodeColors" -> {Blue, Green}]
Out[23]=

Possible Issues (4) 

"Removed" and "Ordinal" qualifiers must be an integer:

In[24]:=
ResourceFunction[
 "GenealogyTreePlot"][{"Cousin", "Ordinal" -> 1, "Removed" -> 2.5}]
Out[24]=

Some relationships can be referred to multiple ways. In these cases, the plot will be labeled with a canonicalized label for the relationship. Here your mother's second cousin once removed is referred to as your second cousin twice removed:

In[25]:=
ResourceFunction[
 "GenealogyTreePlot"][{"Mother", {"Cousin", "Ordinal" -> 2, "Removed" -> 1}}]
Out[25]=

Your grandfather's granddaughter could be one of several relationships, but the tree only provides one:

In[26]:=
ResourceFunction[
 "GenealogyTreePlot"][{"Grandfather", "Granddaughter"}]
Out[26]=

Your brother's sister could be one of several relationships, but the tree only provides one:

In[27]:=
ResourceFunction["GenealogyTreePlot"][{"Brother", "Sister"}]
Out[27]=

Version History

  • 3.0.0 – 24 October 2019
  • 2.0.0 – 19 September 2019
  • 1.0.0 – 20 August 2019

License Information