From 69134b0bc1039b9e6cadcc98f029a966f841c2c3 Mon Sep 17 00:00:00 2001 From: Arafat Rahman Date: Tue, 3 Dec 2024 17:14:13 -0800 Subject: [PATCH] Update simple.tanglegram.R --- R/simple.tanglegram.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/simple.tanglegram.R b/R/simple.tanglegram.R index c58f975..e1642e6 100644 --- a/R/simple.tanglegram.R +++ b/R/simple.tanglegram.R @@ -88,7 +88,7 @@ simple.tanglegram <- function (tree1, tree2, column, value, if (is.na(l_color)) { - pp <- pp + new_scale_color() + ggplot2::geom_line(aes(x = lab_x, y = y, group = label, color = label), data = conditional_subset, show.legend = FALSE) + + pp <- pp + ggnewscale::new_scale_color() + ggplot2::geom_line(aes(x = lab_x, y = y, group = label, color = label), data = conditional_subset, show.legend = FALSE) + scale_color_viridis_d(option="turbo") # Use a color scale for discrete colors } else { pp <- pp + ggplot2::geom_line(aes(lab_x, y, group=label), data=conditional_subset, color=l_color, show.legend = FALSE)