From 489bb6e967854e0e3517ae171e7d1197bb55fff6 Mon Sep 17 00:00:00 2001 From: "Liam J. Revell" Date: Tue, 7 Jun 2016 15:59:37 -0400 Subject: [PATCH] handy fix to contMap & densityMap for short internal edges --- R/contMap.R | 3 ++- R/densityMap.R | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/R/contMap.R b/R/contMap.R index 0f574443..80caba74 100644 --- a/R/contMap.R +++ b/R/contMap.R @@ -1,5 +1,5 @@ # function plots reconstructed values for ancestral characters along the edges of the tree -# written by Liam J. Revell 2012, 2013, 2014, 2015 +# written by Liam J. Revell 2012, 2013, 2014, 2015, 2016 contMap<-function(tree,x,res=100,fsize=NULL,ftype=NULL,lwd=4,legend=NULL, lims=NULL,outline=TRUE,sig=3,type="phylogram",direction="rightwards", plot=TRUE,...){ @@ -53,6 +53,7 @@ contMap<-function(tree,x,res=100,fsize=NULL,ftype=NULL,lwd=4,legend=NULL, if(is.null(lims)) lims<-c(min(y),max(y)) trans<-0:1000/1000*(lims[2]-lims[1])+lims[1] names(trans)<-0:1000 + tree$maps<-vector(mode="list",length=nrow(tree$edge)) for(i in 1:nrow(tree$edge)){ XX<-cbind(c(H[i,1],steps[intersect(which(steps>H[i,1]),which(stepsH[i,1]),which(stepsH[i,1]),which(stepsH[i,1]),which(steps