Browse code

update fortify for pvclust class

xiangpin authored on 15/08/2022 12:35:56
Showing 1 changed files

... ...
@@ -33,14 +33,14 @@ scaleY <- function(phylo, df, yscale, layout, ...) {
33 33
 
34 34
 
35 35
 adjust_hclust_tip.edge.len <- function(df, phylo){
36
-    mx <- max(df$x, na.rm=TRUE)
37
-    df$x <- df$x - mx       
38
-    df$branch <- df$branch - mx
39 36
     tip.edge.len <- attr(phylo, 'tip.edge.len')
40 37
     if (!is.null(tip.edge.len)){
38
+        mx <- max(df$x, na.rm=TRUE)
39
+        df$x <- df$x - mx
40
+        df$branch <- df$branch - mx
41 41
         df[df$isTip, "x", drop=TRUE] <- tip.edge.len
42
+        attr(df, 'revts.done') = TRUE
42 43
     }                       
43
-    attr(df, 'revts.done') = TRUE
44 44
     return(df)
45 45
 }
46 46