points.phyloLayout: points.phyloLayout

View source: R/tree.R

points.phyloLayoutR Documentation

points.phyloLayout

Description

A generic function to add points to the plot. This is customized for phyloLayout S3 objects that provide the x- and y- coordinates for tips and internal nodes.

Usage

## S3 method for class 'phyloLayout'
points(obj, ...)

Arguments

obj:

S3 object of class 'phyloLayout'

...:

additional graphical parameters to pass to points()

Examples

# the structSI `phylo` object was generated by simulating
# an epidemic within a structured population
l <- tree.layout(structSI, type='r') 
plot(l)

# highlight nodes that represent transmission or migration events
cex <- as.integer(structSI$event.type %in% c('transmission', 'migration'))
bg <- ifelse(structSI$event.type=='transmission', 'dodgerblue', 'salmon')
points(l, cex=cex, pch=21, bg=bg)


ArtPoon/ggfree documentation built on July 11, 2024, 11:15 a.m.