points.phyloLayout | R Documentation |
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.
## S3 method for class 'phyloLayout'
points(obj, ...)
obj: |
S3 object of class 'phyloLayout' |
...: |
additional graphical parameters to pass to points() |
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.