plot.cophy: Plot host and symbiont pair with current associations

Description Usage Arguments Details Value Functions Author(s) Examples

View source: R/plot_cophy.R

Description

This function plots a host and symbiont tree given the object returned by 'sim_cophyBD'.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## S3 method for class 'cophy'
plot(
  x,
  use_edge_length = TRUE,
  type = "phylogram",
  col = par("fg"),
  lwd = par("lwd"),
  lty = par("lty"),
  show_tip_label = TRUE,
  gap = 1,
  font = 3,
  fsize = 1,
  show_div_bar = FALSE,
  ...
)

## S3 method for class 'multiCophy'
plot(x, ...)

Arguments

x

object of class multiCophy

use_edge_length

Boolean to draw trees with edge length or not

type

string "phylogram" or "cladogram"

col

What color to draw links between trees

lwd

Width of links between trees

lty

Type of line to draw between trees

show_tip_label

Boolean for showing labels

gap

Size of the gap between the tips and tip names

font

What font to use (bold, italic (default), etc.)

fsize

What size font as a character expansion factor (same as cex)

show_div_bar

Shows a bar under both trees with ticks where the divergences are (default: F)

...

other plotting parameters

Details

This function is mostly an altered version of the cophyloplot function written by Damien de Vienne Copyright 2008 - 2010 under GPL.

Value

a plot of the host and symbiont tree with extant interactions

Functions

Author(s)

Wade Dismukes and Damien de Vienne

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
host_mu <- 1.0 # death rate
host_lambda <- 2.0 # birth rate
numb_replicates <- 10
time <- 1.0
symb_mu <- 0.2
symb_lambda <- 0.4
host_shift_rate <- 0.0
cosp_rate <- 2.0

cophylo_pair <- sim_cophyBD(hbr = host_lambda,
                           hdr = host_mu,
                           cosp_rate = cosp_rate,
                           host_exp_rate = host_shift_rate,
                           sdr = symb_mu,
                           sbr = symb_lambda,
                           numbsim = numb_replicates,

                           time_to_sim = time)
plot.cophy(cophylo_pair[[1]])

treeducken documentation built on March 3, 2021, 1:11 a.m.