plot.clustered_phylo: Plots a clustered_phylo object.

Description Usage Arguments Value Author(s) Examples

View source: R/simulclustphyl.R

Description

The function plots a clustered_phylo object allowing the user to differently visualize the different clades/clusters on the phylogeny and also the joining them subtree.

Usage

1
2
3
4
## S3 method for class 'clustered_phylo'
plot(x, clust_cols = NULL, clust_edge.width = NULL, 
clust_edge.lty = NULL, clust_tip.color = "black", joiningphylo_col = "black", 
joiningphylo_edge.width = 1, joiningphylo_edge.lty = 1, ...)

Arguments

x

A phylogenetic tree of class clustered_phylo, i.e. output of mvSLOUCH::simulate_clustered_phylogeny()

clust_cols

Vector of colours of edges inside each cluster. Default NULL, corresponding to "black". If length of this vector does not equal to the number of clusters, then it is recycled.

clust_edge.width

Numeric vector of widths of edges inside each cluster. Default NULL, corresponding to 1. If length of this vector does not equal to the number of clusters, then it is recycled.

clust_edge.lty

Vector of an edge's type inside each cluster. Default NULL, corresponding to 1. If length of this vector does not equal to the number of clusters, then it is recycled.

clust_tip.color

Vector of colours of tips' labels inside each cluster. Default NULL, corresponding to "black". If length of this vector does not equal to the number of clusters, then it is recycled.

joiningphylo_col

Colour of edges inside the subtree joining the clusters.

joiningphylo_edge.width

Width of edges inside the subtree joining the clusters.

joiningphylo_edge.lty

Edges' type inside the subtree joining the clusters.

...

Other parameters to be passed to plot.phylo(). Notice that here we cannot have edge.color, edge.width and edge.lty.

Value

Same as plot.phylo().

Author(s)

Krzysztof Bartoszek

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
RNGversion(min(as.character(getRversion()),"3.6.1"))
set.seed(12345, kind = "Mersenne-Twister", normal.kind = "Inversion")

phyltree<-simulate_clustered_phylogeny(v_sizeclusts=c(5,5,5),f_simclustphyl="sim.bd.taxa_Yule1",
b_change_joining_branches=TRUE, joining_branchlengths=c(20,NA),joining="sim.bd.taxa_Yule1")

plot(phyltree,clust_cols=c("red","green","blue"),clust_edge.width=3,clust_edge.lty=c(1,2,3),
clust_tip.color=c("red","blue","green"),joiningphylo_col="black",joiningphylo_edge.width=3,
joiningphylo_edge.lty=1)

## and not plot without tip labels
plot(phyltree,clust_cols=c("red","green","blue"),clust_edge.width=3,clust_edge.lty=c(1,2,3),
joiningphylo_col="black",joiningphylo_edge.width=3,joiningphylo_edge.lty=1,show.tip.label=FALSE)

RNGversion(as.character(getRversion()))

mvSLOUCH documentation built on Nov. 25, 2021, 5:06 p.m.