View source: R/geom_pedigreepoint.R
geom_pedigreepoint | R Documentation |
The pedigreepoint geom is used to create the symbols on a pedigree chart representing individuals. Points are shaped by gender, can be marked as deceased and tagged with multiple colours.
geom_pedigreepoint(
data = NULL,
mapping = NULL,
stat = "identity",
position = "identity",
...,
na.rm = FALSE,
na.colour = "#080808",
size = 5,
show.legend = NA,
inherit.aes = TRUE
)
data |
The data to be displayed in this layer. There are three options: If A A |
mapping |
Set of aesthetic mappings created by |
stat |
The statistical transformation to use on the data for this layer.
When using a
|
position |
A position adjustment to use on the data for this layer. This
can be used in various ways, including to prevent overplotting and
improving the display. The
|
... |
Other arguments passed on to
|
na.rm |
If |
na.colour |
Colour to fill symbols with if feature is |
size |
Symbol size. |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
geom_pedigreepoint()
: geom_pedigreepoint
geom_pedigreepoint()
understands the following aesthetics (required aesthetics are in bold - data type is critical for correct plotting):
x Coordinate. Numeric.
y Coordinate. Numeric.
sex Gender. Factor. 1 or M is Male, 2 or F is Female
isdead Factor or Logical. 0 or FALSE is Alive, 1 or TRUE is Dead. If factor, 2 is Stillbirth or Miscarriage. All others are Unknown.
feature.name Features to plot.
feature.value Corresponding status of feature.
adopted Logical. Depicted as brackets around symbol.
pregnancy Logical. Depicted as P in symbol.
colour Stroke colour. Default: "black".
alpha Symbol alpha. Default: 1.
stroke Stroke thickness.
Scales
tmp<-data.frame(x=c(1,1,2),y=c(1,2,1),sex=as.factor(c(1,2,1)),status=as.factor(c(2,1,1)),feature.name=as.factor(c("test","test","test")),feature.value=c(TRUE,FALSE,TRUE))
ggplot()+
geom_pedigreepoint(tmp,aes(x=x,y=y,sex=sex, isdead=status, feature.name=feature.name, feature.value=feature.value),
size=7,
na.colour="#808080")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.