Learn R Programming

RADami (version 1.1-2)

plot.locus.dist: Plot a phylogeny with a graphical representation of locus sharing

Description

Plots a phylogeny lined up with the locus-sharing similarity matrix in graphical style

Usage

# S3 method for locus.dist
plot(x, tr, trW = 3, plotW = 5, labelsW = 3, plotGap = 0.25,
     scalar = 1.5, barH = 1, barW = 10, bar.cex = 0.5,
		 point.pch = c(21, 21),
     cols = c('black', 'red'), ...)

Arguments

x
output from locus.dist
tr
an object of class phylo with tips named the same as the rows of locD
trW
width of the panels holding the tree
plotW
width of the panel holding the matrix plot
labelsW
width of the panel holding the taxon labels (right side of plot)
plotGap
gap between the side panels and the central panel
scalar
the scalar for the dots in the locus distance plot
barH
height of the panel holding the bars
barW
width of individual bars; goes to lwd
bar.cex
font size for numbers above the bars
point.pch
plot character (pch) for the off-diagonal and diagonal elements of the matrix plot
cols
color for the off-diagonal and diagonal elements of the matrix plot
additional arguments passed along to text

Value

A list comprising:
Xs
the x-coordinates of dots in the matrix plot
heights
heights of the bars at the top of the plot, which show the overlap of each individual averaged over all other individuals on the plot

Details

Use default options in locus.dist to get a sensible plot. Also, while different plotting characters can be defined for the off-diagonal and diagonal elements of the matrix plot, these may be hard to compare with each other in size; probably the diagonal elements are better distinguished by color or shading. Currently, this function is implemented using layout, which makes it rather clunky and inflexible.

See Also

plot.rankedPartitionedRAD, locus.dist

Examples

Run this code
  data(oak.rads)
  data(oak.tree)
  plot.locus.dist(locus.dist(oak.rads, proportional = TRUE), oak.tree)
  # and now a nicer-looking plot:
  plot.locus.dist(locus.dist(oak.rads, proportional = TRUE, upper = TRUE),
                  ladderize(oak.tree), trW = 1, labelsW = 1, scalar = 3)

Run the code above in your browser using DataLab