From 383f8f2f9a088eaaeea38378ec82fb4ed960e2ab Mon Sep 17 00:00:00 2001 From: Klaus Schliep Date: Fri, 22 Nov 2024 17:51:10 +0100 Subject: [PATCH] bug fix --- R/plot.phylo.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/plot.phylo.R b/R/plot.phylo.R index 8cd2592..042fc7c 100644 --- a/R/plot.phylo.R +++ b/R/plot.phylo.R @@ -753,7 +753,7 @@ circular.plot <- function(edge, Ntip, Nnode, xx, yy, theta, i <- start[k] j <- end[k] # make number of segments dependent on the angle - n_segments <- as.integer(2 + (theta[edge[j, 2]] - theta[edge[i, 2]]) / 0.03) + n_segments <- abs(as.integer(2 + abs(theta[edge[j, 2]] - theta[edge[i, 2]]) / 0.03)) X <- rep(r[edge[i, 1]], n_segments) Y <- seq(theta[edge[i, 2]], theta[edge[j, 2]], length.out = n_segments) x <- X * cos(Y); y <- X * sin(Y)