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

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/plot.locus.dist.R

Description

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

Usage

1
2
3
4
5
## S3 method for class '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

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.

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

Author(s)

Andrew Hipp

See Also

plot.rankedPartitionedRAD, locus.dist

Examples

1
2
3
4
5
6
  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)

RADami documentation built on May 30, 2017, 8:23 a.m.