View source: R/plot.locus.dist.R
plot.locus.dist | R Documentation |
Plots a phylogeny lined up with the locus-sharing similarity matrix in graphical style
## 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'), ...)
x |
output from |
tr |
an object of class |
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 |
bar.cex |
font size for numbers above the bars |
point.pch |
plot character ( |
cols |
color for the off-diagonal and diagonal elements of the matrix plot |
... |
additional arguments passed along to |
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.
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 |
Andrew Hipp
plot.rankedPartitionedRAD
,
locus.dist
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.