Hi I wonder whether there is a way to change the colours of the
host-parasite associations in plot.cophylo in phytools. I tried: t1 <- rtree(10) t2 <- rtree(10) obj <- cophylo(t1,t2) plot.cophylo(obj, link.col= "red") But the links appear in black. According to the code in
https://github.com/liamrevell/phytools/blob/master/R/cophylo.R,
link.col is set in the internal function makelinks (l. 119), being
"black" the default. However, in function plot.cophylo (l.
151-152), it is indicated if(hasArg(link.col)) link.col<-list(...)$link.col else link.col<-"black" So I can't see why link.color = "red" didn't work. Eventually I wish to code each host-parasite association as a
colour in function of a continuous trait. Actually I managed to do it with cophyloplot in ape cophyloplot(TreeH, TreeP, assoc=links, use.edge.length=FALSE, gap=0, space=20, col=links$Col) Where links$Col is a vector of colours ranging from "red" to
"blue". However, I'd rather use plot.cophylo to the advantage of
the optimal rotation of branches. Any help will be most welcome. Juan A. Balbuena --
Dr.
Juan
A. Balbuena |
_______________________________________________ R-sig-phylo mailing list - R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/