plot.admix.arrows: Plots admixture arrows

View source: R/space.mix.MCMC.R

plot.admix.arrowsR Documentation

Plots admixture arrows

Description

This function plots the admixture arrows, from the sources of admixture to their targets, on the geogenetic map estimated as part of a SpaceMix analysis. The width and opacity of these arrows can be proportional to their admixture proportions, which provides an intuitive visualization of the amount of admixture each sample is drawing.

Usage

## S3 method for class 'admix.arrows'
plot(admix.source.coords, geogen.coords,
  admix.proportions, colors = NULL, length = 0.1)

Arguments

admix.source.coords

This is a k x 2 matrix of coordinates in which the two elements of the ith row give the x-coordinate and y-coordinate of the source admixture for sample i.

geogen.coords

This is a k x 2 matrix of coordinates in which the two elements of the ith row give the x-coordinate and y-coordinate of the geogenetic location of the ith sample.

admix.proportions

This is a vector of length k in which each element is the estimated admixture proportion in the corresponding sample.

colors

This is a vector of colors of length k in which each element gives the color in which the corresponding sample should be plotted.

length

This value determines the length of the edges of the arrow head (in inches). The default value is 0.1.

Value

This function plots the admixture arrows on an existing plotting window. Its return value is invisible.


gbradburd/SpaceMix documentation built on Oct. 19, 2022, 12:43 p.m.