plot_crosslines | R Documentation |
Add lines for a cross
plot_crosslines(
momloc,
dadloc,
kidsloc,
gap = 3,
chrlength = 30,
cex = 1.5,
lwd = 2,
arrow_length = 0.1,
col = "white",
...
)
momloc |
An (x,y) vector with center location for mother |
dadloc |
An (x,y) vector with center location for mother |
kidsloc |
Either an (x,y) vector with center location for a kid, or a list of such for multiple kids |
gap |
Gap arrows and points/rectangles |
chrlength |
Length of chromosomes |
cex |
Character expansion for x point |
lwd |
Line width for points, segments, and arrows |
arrow_length |
The |
col |
Color of lines and points |
... |
Additional arguments passed to arrows() and segments() |
None.
plot_ind()
mom <- create_parent(100, 1:2)
dad <- create_parent(100, 3:4)
kids <- lapply(1:4, function(junk) cross(mom, dad))
plot(0,0, type="n", xlim=c(0, 100), ylim=c(0,100),
xaxt="n", yaxt="n", xlab="", ylab="")
loc <- list(c(25,75), c(75,75), c(12.5,25), c(37.5,25), c(62.5, 25), c(87.5,25))
plot_ind(mom, loc[[1]])
plot_ind(dad, loc[[2]])
for(i in 1:4) plot_ind(kids[[i]], loc[[i+2]])
plot_crosslines(loc[[1]], loc[[2]], loc[3:6])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.