Skip to content

Commit

Permalink
new option in plotTree.barplot
Browse files Browse the repository at this point in the history
  • Loading branch information
liamrevell committed Oct 18, 2017
1 parent e984799 commit 1007197
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
8 changes: 4 additions & 4 deletions DESCRIPTION
@@ -1,6 +1,6 @@
Package: phytools
Version: 0.6-30
Date: 2017-10-03
Version: 0.6-31
Date: 2017-10-18
Title: Phylogenetic Tools for Comparative Biology (and Other Things)
Author: Liam J. Revell
Maintainer: Liam J. Revell <liam.revell@umb.edu>
Expand Down Expand Up @@ -56,6 +56,6 @@ Description: Package contains various functions for phylogenetic analysis.
research.
License: GPL (>= 2)
URL: http://github.com/liamrevell/phytools
Packaged: 2017-10-03 12:00:00 EST
Packaged: 2017-10-18 12:00:00 EST
Repository:
Date/Publication: 2017-10-03 12:00:00 EST
Date/Publication: 2017-10-18 12:00:00 EST
6 changes: 4 additions & 2 deletions R/plotTree.wBars.R
Expand Up @@ -52,7 +52,9 @@ plotTree.boxplot<-function(tree,x,args.plotTree=list(),
## written by Liam J. Revell 2016, 2017

plotTree.barplot<-function(tree,x,args.plotTree=list(),
args.barplot=list()){
args.barplot=list(), ...){
if(hasArg(add)) add<-list(...)$add
else add<-FALSE
cw<-reorder(tree)
if(is.data.frame(x)) x<-as.matrix(x)
if(is.matrix(x)){
Expand Down Expand Up @@ -87,7 +89,7 @@ plotTree.barplot<-function(tree,x,args.plotTree=list(),
args.plotTree$mar[3]<-args.barplot$mar[3]
if(is.null(args.plotTree$ftype)) args.plotTree$ftype<-"i"
if(is.null(args.plotTree$lwd)) args.plotTree$lwd<-1
par(mfrow=c(1,2))
if(!add) par(mfrow=c(1,2))
do.call(plotTree,args.plotTree)
par(mar=args.barplot$mar)
obj<-do.call(barplot,args.barplot)
Expand Down
6 changes: 3 additions & 3 deletions man/plotTree.wBars.Rd
Expand Up @@ -7,8 +7,8 @@
plotTree.wBars(tree, x, scale=1, width=NULL, type="phylogram",
method="plotTree", tip.labels=FALSE, col="grey", border=NULL,
...)
plotTree.barplot(tree,x,args.plotTree=list(),args.barplot=list())
plotTree.boxplot(tree,x,args.plotTree=list(),args.boxplot=list())
plotTree.barplot(tree, x, args.plotTree=list(), args.barplot=list(), ...)
plotTree.boxplot(tree, x, args.plotTree=list(), args.boxplot=list())
}
\arguments{
\item{tree}{an object of class \code{"phylo"}.}
Expand All @@ -23,7 +23,7 @@ plotTree.boxplot(tree,x,args.plotTree=list(),args.boxplot=list())
\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}}.}
\item{...}{optional arguments to be passed to \code{\link{plotTree}} or \code{\link{plotSimmap}}.}
\item{...}{optional arguments to be passed to \code{\link{plotTree}} or \code{\link{plotSimmap}} in the case of \code{plotTree.wBars}. For \code{plotTree.barplot}, the only optional argument is \code{add}. Generally this should not be used; however it can be used to tell the function to draw the tree & barplot, respectively, in the next two open plotting devices - rather than creating a table of figures in the current plotting device.}
}
\description{
\code{plotTree.wbars} plots a phylogeny in phylogram or fan style with bars at the tips representing the values for a phenotypic trait.
Expand Down

0 comments on commit 1007197

Please sign in to comment.