plotTrees
¶
Plot trees from newick string
Description¶
Plot trees from newick string
Usage¶
plotTrees(trees, prune = NULL, keepSeqs = NULL, treeInfo = NULL,
col = "black", leafCol = col, leafLabels = NULL, timeScale = 1,
drawSpr = FALSE, ylab = "Generations", xlab = "",
logScale = FALSE, ylim = NULL, add = FALSE, mar = c(8, 4, 1, 1),
regionSide = 1, regionLine = 4, mod = NULL, popwidth = NULL, ...)
Arguments¶
Argument |
Description |
---|---|
|
A character vector, each element is a newick tree to plot |
|
A list of leafs to prune from the tree before plotting (Null means prune none) |
|
A list of leafs to keep in the tree (NULL means keep all) |
|
If given, should be a character vector of same length as trees |
|
Either a character string (single value) giving color of tree. Or, a list giving color to plot each leaf branch. Internal branches will be plotted as “average” color among child leafs. |
|
If given, this can be a list assigning a color to each leaf name (individual names also work if haploid names are in the form indName_1 and indName_2) |
|
A list indexed by the leaf names in the tree, giving the label to display for each leaf name. If NULL, the leaf names are displayed. |
|
multiply all branches by this value |
|
If TRUE, draw the SPR event that turns each tree into the next one |
|
label for y axis |
|
Label for x axis |
|
If TRUE, plot in log scale |
|
Range for y axis (default; use range of tree) |
|
If TRUE, do not create a new plot |
|
Margins for plot |
|
Print treeInfo to the margins on this side (1=bottom, 2=left, 3=top, 4=right, anything else = don’t print) |
|
Print region of eaach tree on this line of the margin |
|
(Advanced; for use with multi-population version of ARGweaver) A model file read in with the function readPopModel, will draw population model underneath tree |
|
If mod is not null, popwidth can be a numeric vector of length equal to the number of populations, giving relative width of each |
|
Passed to plot function |
Note¶
This creates a new plot for each tree. If plotting to the screen, probably want to call par(ask=TRUE) first.