YuLab-SMU / ggtree

:christmas_tree:Visualization and annotation of phylogenetic trees
https://yulab-smu.top/treedata-book/
821 stars 172 forks source link

Collapsing clade in circular layout gives curved min/max/mixed triangles #593

Open AroneyS opened 9 months ago

AroneyS commented 9 months ago

When clades are collapsed in circular layout, the "triangle" representation is curved.

nwk <- system.file("extdata", "sample.nwk", package = "treeio")
tree <- read.tree(nwk)
p1 <- ggtree(tree) %>%
  collapse(node = 21, "mixed")

p2 <- ggtree(tree, layout = "circular") %>%
  collapse(node = 21, "min")

p3 <- ggtree(tree, layout = "circular") %>%
  collapse(node = 21, "max")

p4 <- ggtree(tree, layout = "circular") %>%
  collapse(node = 21, "mixed")

e.g. p4

p4