From a7ffc89c36f471497b10d731d48d0dc3f5f91c8b Mon Sep 17 00:00:00 2001 From: Will Gearty Date: Wed, 30 Oct 2019 14:39:12 -0500 Subject: [PATCH 1/2] Allow for varying border color --- R/plotTree.wBars.R | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/R/plotTree.wBars.R b/R/plotTree.wBars.R index 0b2ebada..2ee3bcdb 100644 --- a/R/plotTree.wBars.R +++ b/R/plotTree.wBars.R @@ -108,7 +108,7 @@ plotTree.barplot<-function(tree,x,args.plotTree=list(), ## written by Liam J. Revell 2014, 2015, 2018, 2019 plotTree.wBars<-function(tree,x,scale=NULL,width=NULL,type="phylogram", - method="plotTree",tip.labels=FALSE,col="grey",border=NULL,...){ + method="plotTree",tip.labels=FALSE,col="grey",border="black",...){ if(!inherits(tree,"phylo")) stop("tree should be an object of class \"phylo\".") if(is.null(scale)){ scale<-0.3*max(nodeHeights(tree))/diff(range(x)) @@ -201,6 +201,9 @@ plotTree.wBars<-function(tree,x,scale=NULL,width=NULL,type="phylogram", if(length(col) Date: Wed, 30 Oct 2019 14:42:01 -0500 Subject: [PATCH 2/2] Add documentation --- man/plotTree.wBars.Rd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/plotTree.wBars.Rd b/man/plotTree.wBars.Rd index 0360887f..f4770dde 100644 --- a/man/plotTree.wBars.Rd +++ b/man/plotTree.wBars.Rd @@ -19,7 +19,7 @@ plotTree.boxplot(tree, x, args.plotTree=list(), args.boxplot=list()) \item{method}{plotting method to use. Can be \code{"plotTree"} (for \code{\link{plotTree}}) or \code{"plotSimmap"} (for \code{\link{plotSimmap}}).} \item{tip.labels}{argument indicating whether or not tip labels should be plotted. Defaults to \code{tip.labels=FALSE}.} \item{col}{colors of the plotted bars. Can be a single value or a vector with length equal to the number of tips in the tree.} - \item{border}{single value specifying the color of the border for the plotted bars. Defaults to \code{border=NULL}, which means that black borders will be plotted.} + \item{border}{colors of the borders of the plotted bars. Can be a single value or a vector with length equal to the number of tips in the tree.} \item{args.plotTree}{in \code{plotTree.barplot}, arguments to be passed to \code{\link{plotTree}}.} \item{args.barplot}{in \code{plotTree.barplot}, arguments to be passed to \code{\link{barplot}}.} \item{args.boxplot}{in \code{plotTree.boxplot}, arguments to be passed to \code{\link{boxplot}}.}