[Picante-commits] r137 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Jul 17 02:21:55 CEST 2008


Author: pdc
Date: 2008-07-17 02:21:55 +0200 (Thu, 17 Jul 2008)
New Revision: 137

Modified:
   pkg/R/evolve.trait.R
Log:
ensure the tree is in the proper order
added a comment and a todo

Modified: pkg/R/evolve.trait.R
===================================================================
--- pkg/R/evolve.trait.R	2008-07-15 22:11:18 UTC (rev 136)
+++ pkg/R/evolve.trait.R	2008-07-17 00:21:55 UTC (rev 137)
@@ -25,7 +25,8 @@
 	use.color = FALSE, # plots with color
 	use.bl = TRUE,
 	debug = FALSE) {
-
+	# I think this code requires the tree to be in cladewise order -- pdc
+	phy <- reorder(phy, 'cladewise')
 	#print(mu)
 	phy$edge.length.original = phy$edge.length
 	minbl = min(phy$edge.length)
@@ -153,6 +154,7 @@
 		} else {
 			plot.phylo(phy,show.tip.label=FALSE)
 		}
+		## TODO scale bar often overlaps with bottom branch
 		add.scale.bar(0,1,set.minbl)	
 		
 		plot(c(0,max.ht),c(min.trait,max.trait),type='n',xlab='time',ylab='trait value')



More information about the Picante-commits mailing list