| legendPlot | R Documentation | 
Pedigree plot with ready-made legend along the bottom of the page to represent colors and affection statuses
legendPlot(
  x,
  id = x$id,
  affected = x$affected,
  affected.label = NULL,
  col = 1,
  col.label = NULL,
  symbolsize = 0.75,
  cex = 0.5,
  ...
)
x | 
 Pedigree data frame with ped (pedigree id), id (id of individual), father (id of father), mother (id of mother), sex, affected (affection status), and avail (DNA availability).  | 
id | 
 Optional, a character string to replace the correspinding id for persons in the pedigree  | 
affected | 
 A variable indicating affection status. A multi-column matrix can be used to give the status with respect to multiple traits. Logical, factor, and integer types are converted to 0/1 representing unaffected and affected, respectively. NAs are considered missing.  | 
affected.label | 
 Set labels for affection statuses  | 
col | 
 Colors for the plot symbol for each individual  | 
col.label | 
 Named vector, with elements matching the unique color codes, the names are the labels used in the legend.  | 
symbolsize | 
 Size of symbols (circle/square/triangle). Default is 1.0  | 
cex | 
 Character expansion size for labels and ids. Default is 1.0  | 
... | 
 Character expansion size for labels and ids. Default is 1.0  | 
A pedigree plot with a legend
Jason Sinnwell, code contributed by Sara Achenbach
pedigree, plot.pedigree
## Not run: 
data(sample.ped)
pedAll <- with(sample.ped, pedigree(id, father, mother, sex,
               affected=cbind(affected, avail), famid=ped)
ped1 <- pedAll["1"]
legendPlot(ped1,  affected.label=c("cancer","available"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.