The pedigree from Figure 2 in Boichard et al. ref352 is shown in Figure 9.1, and shows males enclosed in rectangles and females in ovals. Figure 9.2 shows a pedigree in which strings are used for animal IDs; animal are enclosed in ovals because sexes were not specified in the pedigree file and the set_sexes option was not specified. A more complex German Shepherd pedigree is presented in Figure 9.3; the code used to create this pedigree is:
9.1.1 Drawing Pedigrees
pyp_graphics.draw_pedigree(example, gfilename='doug_p_rl_notitle', gname=1,
Pedigree 2 from Boichard et al. (1997)
A pedigree with strings as animal IDs
The resulting graphic is written to doug_p_rl_notitle.jpg; note from Table 9.1 that the default file format for draw_pedigree() is JPG rather than PNG, as is the case for the other graphics routines. To get a PNG simply pass the argument gformat='png' to draw_pedigree(). For details on the options taken by draw_pedigree() please refer to the API documentation (Section ). draw_pedigree() uses rectangles to indicates known males, circles to indicate known females, and octagons to indicate animals of unknown sex.
German Shepherd pedigree
Pedigrees can also be colored using the color_pedigree() function in the pyp_jbc module. At present, animals are shaded either by the number of sons produced or by the total number of descendants. The five-generation pedigree of the Newfoundland dog King von der Düssel is presented in Figure 9.4 (http://www.newfoundlanddog-database.net/en/ahnen.php?num=0000025330, data used with permission), and the nodes are shaded based on number of descendants.
Newfoundland colored pedigree
Windows users should set the drawers keyword to 'old' when calling color_pedigree(). This will call draw_colored_pedigree() rather than new_draw_colored_pedigree(). The latter requires that PyGraphviz library be installed and there is not yet an easy way to install it on Windows.
See About this document... for information on suggesting changes.